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) <noreply@anthropic.com>
This commit is contained in:
kang
2026-04-23 16:35:50 +08:00
parent 7193eacfa5
commit a3381cbfd8
2 changed files with 5 additions and 4 deletions

View File

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