fix: route developer terminal API before dashboard fallback
This commit is contained in:
@@ -279,6 +279,17 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Serve static files (Vue.js SPA)
|
# 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 / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
add_header Cache-Control "no-cache, must-revalidate";
|
add_header Cache-Control "no-cache, must-revalidate";
|
||||||
@@ -1257,6 +1268,15 @@ server {
|
|||||||
return 404;
|
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 / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user