简体   繁体   中英

How to disable Swagger ui documentation in Fastapi for production server?

How to disable Swagger ui documentation in Fastapi for production server? i need disable fastapi documentation

Construct your app with docs_url=None and redoc_url=None and FastAPI won't mount those endpoints.

app = FastAPI(docs_url=None, redoc_url=None)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM