From 3bedcf4b9e99633682cbc982d2c3d73176f0db04 Mon Sep 17 00:00:00 2001 From: ingalls Date: Wed, 2 Oct 2024 11:09:32 -0400 Subject: [PATCH] Exact Match --- api/nginx.conf | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/api/nginx.conf b/api/nginx.conf index 485b46233..17ecd1415 100644 --- a/api/nginx.conf +++ b/api/nginx.conf @@ -39,19 +39,10 @@ http { set $CONNECT "connect-src 'self' *.API_URL:* *.ROOT_URL:*"; 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 / { - if ($request_uri ~ ^/(.*)\.html) { - return 302 /$1; - } - + location = / { alias /home/etl/api/web/dist/; - - try_files $uri $uri.html $uri/ @index; - autoindex on; - } - location @index { 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; @@ -63,7 +54,18 @@ http { add_header Expires 0; add_header Pragma no-cache; - try_files /index.html; + try_files $uri $uri.html $uri/ /index.html; + } + + location / { + if ($request_uri ~ ^/(.*)\.html) { + return 302 /$1; + } + + alias /home/etl/api/web/dist/; + autoindex on; + + try_files $uri $uri.html $uri/ /index.html; } location /docs/ {