FastAPI DocShield: protect your API docs with one line
HTTP Basic Auth on the OpenAPI docs endpoints for FastAPI
A tiny FastAPI extension that adds HTTP Basic Authentication to the Swagger UI, ReDoc, and OpenAPI JSON endpoints. Drop it in, set a username and password, and your API docs are no longer public. Useful when you want docs in production but not publicly indexable.
