nginx.conf (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
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;
}
}
|