add middlewares (uvicorn)

This commit is contained in:
Jörn-Michael Miehe 2022-09-15 22:41:23 +00:00
parent e8d075a85f
commit 1d8748e63a

View file

@ -33,12 +33,6 @@ app = FastAPI(
app.include_router(main_router)
def main() -> None:
"""
If the `main` script is run, `uvicorn` is used to run the app.
"""
if SETTINGS.production_mode:
# Mount frontend in production mode
app.mount(
@ -63,6 +57,12 @@ def main() -> None:
expose_headers=["*"],
)
def main() -> None:
"""
If the `main` script is run, `uvicorn` is used to run the app.
"""
if webdav_check():
uvicorn_run(
app="ovdashboard_api.main:app",