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; }