security: disable FastAPI docs/redoc/openapi endpoints in production
This commit is contained in:
+1
-1
@@ -380,7 +380,7 @@ async def _process_callback_query(cq: dict):
|
|||||||
finally:
|
finally:
|
||||||
db.close()
|
db.close()
|
||||||
|
|
||||||
app = FastAPI(title="MONT - инфрастуктурный полигон")
|
app = FastAPI(title="MONT - инфрастуктурный полигон", docs_url=None, redoc_url=None, openapi_url=None)
|
||||||
app.mount("/static", StaticFiles(directory="static"), name="static")
|
app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user