diff --git a/api/nginx.conf b/api/nginx.conf index 17ecd1415..74a27272c 100644 --- a/api/nginx.conf +++ b/api/nginx.conf @@ -40,9 +40,6 @@ http { add_header 'Content-Security-Policy' "default-src 'self' *.API_URL; ${IMG}; ${WORKER}; ${CONNECT}; ${STYLE_SRC_ATTR}; ${STYLE_SRC_ELEM}; ${FONT}; upgrade-insecure-requests;" always; location = / { - alias /home/etl/api/web/dist/; - autoindex on; - add_header 'X-Content-Type-Options' 'nosniff' always; add_header 'X-Frame-Options' 'DENY' always; add_header 'Referrer-Policy' 'strict-origin-when-cross-origin' always; @@ -50,11 +47,12 @@ http { add_header 'Permissions-Policy' 'fullscreen=(self), geolocation=(self), clipboard-read=(self), clipboard-write=(self)' always; add_header 'Content-Security-Policy' "default-src 'self' *.API_URL; ${IMG}; ${WORKER}; ${CONNECT}; ${STYLE_SRC_ATTR}; ${STYLE_SRC_ELEM}; ${FONT}; upgrade-insecure-requests;" always; - add_header Cache-Control 'no-store, no-cache, must-revalidate'; - add_header Expires 0; - add_header Pragma no-cache; + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate' always; + add_header 'Expires' 0 always; + add_header 'Pragma' 'no-cache' always; - try_files $uri $uri.html $uri/ /index.html; + alias /home/etl/api/web/dist/; + try_files /index.html =404; } location / { @@ -63,8 +61,6 @@ http { } alias /home/etl/api/web/dist/; - autoindex on; - try_files $uri $uri.html $uri/ /index.html; }