added path variable

This commit is contained in:
2026-10-23 19:38:36 +02:00
parent 19428550ca
commit 0913adaca5
9 changed files with 61 additions and 13 deletions
+8 -2
View File
@@ -28,8 +28,14 @@ server {
add_header Cache-Control "no-cache";
}
# Single page app fallback.
location / {
try_files $uri $uri/ /index.html;
try_files $uri $uri/ @prefixed;
}
# The reverse proxy may forward a sub-path without stripping it (e.g. /website/static/x.js).
# Drop the leading path segment and try again; fall back to the app's index.html.
location @prefixed {
rewrite ^/[^/]+(/.*)$ $1 last;
rewrite ^ /index.html last;
}
}