Skip to content

Commit

Permalink
Disable openapi docs url in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jun 22, 2024
1 parent 6b8b477 commit 6df64a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/init_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ async def http_middleware(

def init_api() -> FastAPI:
app = FastAPI(
openapi_url="/openapi.json" if settings.APP_ENV != "production" else None,
docs_url="/docs" if settings.APP_ENV != "production" else None,
redoc_url="/redoc" if settings.APP_ENV != "production" else None,
)
Expand Down

0 comments on commit 6df64a5

Please sign in to comment.