Files
Arbejd.com-react/nginx/default.conf
2026-03-23 07:49:45 +01:00

29 lines
626 B
Plaintext

server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Never cache HTML entrypoint so new deploys are picked up immediately
location = /index.html {
try_files $uri =404;
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Static assets
location /assets/ {
try_files $uri =404;
access_log off;
expires 30d;
add_header Cache-Control "public, max-age=2592000, immutable";
}
# Single-page app fallback
location / {
try_files $uri $uri/ /index.html;
}
}