From a42c24abdf01659944aa66d6c8a73c4a65abb09a Mon Sep 17 00:00:00 2001 From: archipelago Date: Fri, 9 Oct 2026 17:25:41 -0400 Subject: [PATCH] fix: route developer terminal API before dashboard fallback --- image-recipe/configs/nginx-archipelago.conf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/image-recipe/configs/nginx-archipelago.conf b/image-recipe/configs/nginx-archipelago.conf index bcabd9e8..adf748b3 100644 --- a/image-recipe/configs/nginx-archipelago.conf +++ b/image-recipe/configs/nginx-archipelago.conf @@ -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; }