Merge #dd22151e: Fix developer terminal API routing on both dashboard l…

Fix developer terminal API routing on both dashboard listeners

nostr:nevent1qqsd6gs4r6x9tvd58qmxkp6kl0wap2tmc3fv28r6uxj29ej4fu3djygpz3mhxue69uhhyetvv9ujumn8d96zuer9wcasasgn

PR-Author: Personal
nostr:npub1w3sqdkrhn0gyuvsex32effzgnfpyde6qrrc4u467flg5e9txh4wsfn5vjg

PR description:

Route /api/terminal/ to the authenticated backend before SPA fallback. Live Yaya UAT returned HTML 200 before the fix and JSON 401 after; Framework already had a manual route.
This commit is contained in:
archipelago
2026-10-09 17:26:20 -04:00
@@ -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;
}