fix(api): configure root_path for OpenAPI docs behind reverse proxy

Add ROOT_PATH environment variable support so FastAPI generates correct
URLs for Swagger UI when served behind nginx at /api. This fixes the
"invalid version field" error when accessing /api/docs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-03-15 11:48:11 -04:00
parent 56e8287720
commit 2815deb221
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -161,6 +161,7 @@ app = FastAPI(
description="Semiconductor Patent & Analytics Report Core - Patent portfolio analysis using AI",
version="1.0.0",
lifespan=lifespan,
root_path=config.root_path,
)
# Add CORS middleware for React frontend