mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 13:21:18 +00:00
Disable swagger UI docs in production
This commit is contained in:
@@ -45,7 +45,10 @@ with redirect_stdout(collectstatic_output):
|
|||||||
call_command("collectstatic", "--noinput")
|
call_command("collectstatic", "--noinput")
|
||||||
|
|
||||||
# Initialize the Application Server
|
# 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
|
# Get Django Application
|
||||||
django_app = get_asgi_application()
|
django_app = get_asgi_application()
|
||||||
|
|||||||
Reference in New Issue
Block a user