Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
04db2475
Commit
04db2475
authored
Jan 07, 2024
by
Timothy J. Baek
Browse files
fix: disable swagger doc in prod
parent
70d2571b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
backend/main.py
backend/main.py
+4
-3
No files found.
backend/main.py
View file @
04db2475
import
time
from
fastapi
import
FastAPI
,
Request
from
fastapi
import
FastAPI
,
Request
from
fastapi.staticfiles
import
StaticFiles
from
fastapi.staticfiles
import
StaticFiles
from
fastapi
import
HTTPException
from
fastapi
import
HTTPException
...
@@ -12,8 +14,7 @@ from apps.openai.main import app as openai_app
...
@@ -12,8 +14,7 @@ from apps.openai.main import app as openai_app
from
apps.web.main
import
app
as
webui_app
from
apps.web.main
import
app
as
webui_app
from
apps.rag.main
import
app
as
rag_app
from
apps.rag.main
import
app
as
rag_app
from
config
import
ENV
import
time
class
SPAStaticFiles
(
StaticFiles
):
class
SPAStaticFiles
(
StaticFiles
):
...
@@ -27,7 +28,7 @@ class SPAStaticFiles(StaticFiles):
...
@@ -27,7 +28,7 @@ class SPAStaticFiles(StaticFiles):
raise
ex
raise
ex
app
=
FastAPI
()
app
=
FastAPI
(
docs_url
=
"/docs"
if
ENV
==
"dev"
else
None
,
redoc_url
=
None
)
origins
=
[
"*"
]
origins
=
[
"*"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment