mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Disable swagger UI docs in production
This commit is contained in:
parent
ddf6fd9c09
commit
dbdca7d8d1
1 changed files with 4 additions and 1 deletions
|
@ -45,7 +45,10 @@ with redirect_stdout(collectstatic_output):
|
|||
call_command("collectstatic", "--noinput")
|
||||
|
||||
# Initialize the Application Server
|
||||
app = FastAPI()
|
||||
if os.getenv("KHOJ_DEBUG", "false").lower() == "true":
|
||||
app = FastAPI(debug=True)
|
||||
else:
|
||||
app = FastAPI(docs_url=None) # Disable Swagger UI in production
|
||||
|
||||
# Get Django Application
|
||||
django_app = get_asgi_application()
|
||||
|
|
Loading…
Reference in a new issue