Improve 404 responses settings

This commit is contained in:
nemunaire 2024-04-30 09:21:19 +02:00
parent 0516e1bcf8
commit 8aefd6d75c
1 changed files with 3 additions and 1 deletions

View File

@ -48,7 +48,9 @@
rewrite ^(.*)/ $1/index.html;
}
location @rewrite_proxy {
rewrite ^/(.*)$ /alpo-website/master/$1/index.html break;
if ($http_accept ~ "text/html") {
rewrite ^/(.*)$ /{{ bucket }}{{ path }}{% if always_root not defined or always_root %}/$1{% end if %}/index.html break;
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;