From 3d21110dd9c29283a8528f06ea5d795c7a9fffcb Mon Sep 17 00:00:00 2001 From: Aleksey Razorvin <> Date: Sat, 21 Mar 2026 12:44:15 +0500 Subject: [PATCH] fix: serve FastAPI docs under /api prefix Set docs_url=/api/docs, redoc_url=/api/redoc, openapi_url=/api/openapi.json so Swagger UI is accessible through nginx at http://localhost/api/docs Co-Authored-By: Claude Sonnet 4.6 --- backend/app/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/app/main.py b/backend/app/main.py index 3431823..95b0407 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -3,7 +3,13 @@ from fastapi.middleware.cors import CORSMiddleware from app.api import tests -app = FastAPI(title="QA Test App API", version="0.1.0") +app = FastAPI( + title="QA Test App API", + version="0.1.0", + docs_url="/api/docs", + redoc_url="/api/redoc", + openapi_url="/api/openapi.json", +) app.add_middleware( CORSMiddleware,