From bc1ed8372d4722ce001b75cbfc0df3eb035a729e Mon Sep 17 00:00:00 2001 From: megaproxy Date: Thu, 23 Apr 2026 23:40:18 +0000 Subject: [PATCH] Proxy /demo/ and /health through nginx to backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- frontend/nginx.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/nginx.conf b/frontend/nginx.conf index 684db12..32b2db5 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -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;