Skip to content

Commit

Permalink
Exact Match
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 2, 2024
1 parent 658d43d commit 3bedcf4
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions api/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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/ {
Expand Down

0 comments on commit 3bedcf4

Please sign in to comment.