server { listen 41737; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_types text/plain text/css application/javascript application/json image/svg+xml; gzip_min_length 256; # Share links carry capability tokens in the URL; never leak them via Referer. # Repeated inside locations that use add_header (nginx drops inherited headers there). add_header Referrer-Policy "no-referrer" always; location /api/ { proxy_pass http://backend:41738; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; add_header X-Robots-Tag "noindex" always; add_header Referrer-Policy "no-referrer" always; } location = /index.html { add_header Cache-Control "no-cache"; add_header Referrer-Policy "no-referrer" always; try_files $uri =404; } location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; add_header Referrer-Policy "no-referrer" always; try_files $uri =404; } location / { try_files $uri $uri/ /index.html; } }