2025-08-13 20:56:29 +00:00
|
|
|
worker_processes auto;
|
2025-08-13 19:10:31 -05:00
|
|
|
pid /tmp/nginx.pid;
|
2025-08-13 20:56:29 +00:00
|
|
|
|
|
|
|
|
events {
|
|
|
|
|
worker_connections 1024;
|
|
|
|
|
use epoll;
|
|
|
|
|
multi_accept on;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
http {
|
|
|
|
|
sendfile on;
|
|
|
|
|
tcp_nopush on;
|
|
|
|
|
tcp_nodelay on;
|
|
|
|
|
keepalive_timeout 65;
|
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
|
default_type application/octet-stream;
|
2025-09-28 18:32:58 +01:00
|
|
|
charset utf-8;
|
2025-08-13 20:56:29 +00:00
|
|
|
|
|
|
|
|
access_log /dev/stdout;
|
|
|
|
|
error_log /dev/stderr;
|
|
|
|
|
|
|
|
|
|
gzip on;
|
|
|
|
|
gzip_vary on;
|
|
|
|
|
gzip_min_length 1024;
|
|
|
|
|
gzip_types text/plain text/css text/xml text/javascript
|
|
|
|
|
application/javascript application/xml+rss
|
|
|
|
|
application/json image/svg+xml;
|
|
|
|
|
|
|
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
server_name _;
|
|
|
|
|
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
# Security headers
|
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
|
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
|
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
|
|
2025-08-14 09:45:19 -05:00
|
|
|
# Temporary: Disable caching during development
|
2025-08-13 20:56:29 +00:00
|
|
|
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
2025-08-20 16:25:46 -05:00
|
|
|
expires 10m;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
# add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
|
|
|
# add_header Pragma "no-cache";
|
|
|
|
|
# add_header Expires "0";
|
2025-08-13 20:56:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~* \.html$ {
|
2025-08-20 16:25:46 -05:00
|
|
|
expires 10m;
|
|
|
|
|
add_header Cache-Control "public";
|
|
|
|
|
# add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
|
|
|
# add_header Pragma "no-cache";
|
|
|
|
|
# add_header Expires "0";
|
2025-08-13 20:56:29 +00:00
|
|
|
}
|
2025-09-28 17:58:24 +01:00
|
|
|
|
|
|
|
|
location ~* \.json$ {
|
|
|
|
|
expires 1d;
|
|
|
|
|
add_header Cache-Control "public, must-revalidate";
|
|
|
|
|
}
|
2025-08-13 20:56:29 +00:00
|
|
|
|
|
|
|
|
location /health {
|
|
|
|
|
access_log off;
|
|
|
|
|
return 200 'healthy\n';
|
|
|
|
|
add_header Content-Type text/plain;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error_page 404 /index.html;
|
|
|
|
|
}
|
|
|
|
|
}
|