fix: route developer terminal API before dashboard fallback

This commit is contained in:
archipelago
2026-10-09 17:25:41 -04:00
parent 5b0b35401b
commit a42c24abdf
@@ -279,6 +279,17 @@ server {
}
# Serve static files (Vue.js SPA)
# The developer terminal is an authenticated JSON API. Keep it ahead of
# the SPA fallback so a missing session returns JSON 401, not index.html.
location ^~ /api/terminal/ {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Cookie $http_cookie;
proxy_buffering off;
}
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, must-revalidate";
@@ -1257,6 +1268,15 @@ server {
return 404;
}
location ^~ /api/terminal/ {
proxy_pass http://127.0.0.1:5678;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Cookie $http_cookie;
proxy_buffering off;
}
location / {
try_files $uri $uri/ /index.html;
}