Proxy /demo/ and /health through nginx to backend
nginx only proxied /api/ — so /demo/status returned the SPA HTML, causing useDemoMode() to always resolve to false and all demo guards to silently fail. Add /demo/ and /health proxy blocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0e3ae3b81a
commit
bc1ed8372d
1 changed files with 14 additions and 0 deletions
|
|
@ -17,6 +17,20 @@ server {
|
|||
proxy_send_timeout 120s;
|
||||
}
|
||||
|
||||
# Proxy non-versioned backend endpoints (health, demo status)
|
||||
location /demo/ {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /health {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
# All other routes → index.html (React SPA)
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue