location ~* \.(?:css|js|png|jpe?g|gif|webp|svg|ico|woff2?)$ { root /usr/share/nginx/html; try_files $uri =404; add_header Cache-Control "public, max-age=31536000, immutable"; include /etc/nginx/generated/security-headers.conf; } location = /index.html { root /usr/share/nginx/html; add_header Cache-Control "no-cache"; include /etc/nginx/generated/security-headers.conf; } location = /manifest.json { root /usr/share/nginx/html; add_header Cache-Control "no-cache"; include /etc/nginx/generated/security-headers.conf; } location = /service-worker.js { root /usr/share/nginx/html; add_header Cache-Control "no-cache"; include /etc/nginx/generated/security-headers.conf; } location / { root /usr/share/nginx/html; try_files $uri $uri/ /index.html; }