to disable swagger interface
This commit is contained in:
parent
607fa53553
commit
1892f46633
|
|
@ -31,10 +31,12 @@ async def document():
|
||||||
return RedirectResponse(url="/docs")
|
return RedirectResponse(url="/docs")
|
||||||
|
|
||||||
|
|
||||||
|
# docs_url=None 禁用swagger接口
|
||||||
def create_app(run_mode: str = None):
|
def create_app(run_mode: str = None):
|
||||||
app = FastAPI(
|
app = FastAPI(
|
||||||
title="思极大模型 API Server",
|
title="思极大模型 API Server",
|
||||||
version=VERSION
|
version=VERSION,
|
||||||
|
docs_url=None
|
||||||
)
|
)
|
||||||
MakeFastAPIOffline(app)
|
MakeFastAPIOffline(app)
|
||||||
# Add CORS middleware to allow all origins
|
# Add CORS middleware to allow all origins
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue