server { listen 8080; server_name _; server_tokens off; root /usr/share/nginx/html; index index.html; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; # ---- gzip ---- gzip on; gzip_vary on; gzip_min_length 1024; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/javascript application/javascript application/json application/xml application/rss+xml image/svg+xml font/ttf font/otf font/woff font/woff2 application/vnd.ms-fontobject; location = /healthz { access_log off; default_type text/plain; return 200 "ok\n"; } # Vite fingerprints files under /assets, so they can be cached for a year. location ^~ /assets/ { expires 1y; try_files $uri =404; } location ~* \.(?:js|css|png|jpe?g|gif|webp|avif|svg|ico|woff2?|ttf|otf|eot|mp4|webm)$ { expires 30d; try_files $uri =404; } location / { try_files $uri $uri/ /index.html; } # Always revalidate the entrypoint so deployments are picked up immediately. location = /index.html { expires -1; } location = /favicon.ico { log_not_found off; access_log off; expires 30d; } }