From 1892f46633ca43983e6fbb76d39c61024903e638 Mon Sep 17 00:00:00 2001 From: weiweiw <14335254+weiweiw22@user.noreply.gitee.com> Date: Fri, 13 Sep 2024 09:50:30 +0800 Subject: [PATCH] to disable swagger interface --- server/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/api.py b/server/api.py index 21d07e3..7a63b17 100644 --- a/server/api.py +++ b/server/api.py @@ -31,10 +31,12 @@ async def document(): return RedirectResponse(url="/docs") +# docs_url=None 禁用swagger接口 def create_app(run_mode: str = None): app = FastAPI( title="思极大模型 API Server", - version=VERSION + version=VERSION, + docs_url=None ) MakeFastAPIOffline(app) # Add CORS middleware to allow all origins