From a3381cbfd8fd82fa154a9494254e779d3cccc415 Mon Sep 17 00:00:00 2001 From: kang Date: Thu, 23 Apr 2026 16:35:50 +0800 Subject: [PATCH] nginx: reverse-proxy legacy /scan.html /demo.html /report/* alongside /api/* These paths are still served by the old FastAPI container (now obdx-api), so the new landing nginx must forward them upstream instead of letting the SPA fallback swallow them. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitignore | 1 + nginx.conf | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 30b469a..d3d9367 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ dist .DS_Store .dev-screenshot-*.png .playwright-mcp +.memory *.log diff --git a/nginx.conf b/nginx.conf index f8a437b..2234aa7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -23,10 +23,10 @@ server { try_files $uri =404; } - # Reverse proxy /api/* to FastAPI backend container. - # In Coolify the backend service hostname is the application name on the - # internal network. Override OBDX_API_UPSTREAM at deploy time if it differs. - location /api/ { + # Reverse proxy to FastAPI backend container (legacy obdx-web → obdx-api). + # Covers: /api/v1/* + the three legacy HTML pages and report subpaths that + # the old container still serves. Everything else falls through to the SPA. + location ~ ^/(api/|scan\.html$|demo\.html$|report/) { proxy_pass http://obdx-api:8080; proxy_http_version 1.1; proxy_set_header Host $host;