diff --git a/docker/web/nginx.conf b/docker/web/nginx.conf index 2107e1a..b577abc 100644 --- a/docker/web/nginx.conf +++ b/docker/web/nginx.conf @@ -22,6 +22,19 @@ server { add_header Cache-Control "public, immutable"; } + # Handle /peregrine/ base path — used when accessed directly (no Caddy prefix stripping). + # ^~ blocks regex location matches so assets at /peregrine/assets/... are served correctly. + location ^~ /peregrine/assets/ { + alias /usr/share/nginx/html/assets/; + expires 1y; + add_header Cache-Control "public, immutable"; + } + + location /peregrine/ { + alias /usr/share/nginx/html/; + try_files $uri $uri/ /index.html; + } + # SPA fallback — must come after API and assets location / { try_files $uri $uri/ /index.html;