diff --git a/src/opencdms_api/main.py b/src/opencdms_api/main.py index c5222bf..96acda2 100644 --- a/src/opencdms_api/main.py +++ b/src/opencdms_api/main.py @@ -26,13 +26,22 @@ def get_app(): app = FastAPI() climsoft_app = get_climsoft_app() + # if settings.SURFACE_API_ENABLED is True: + # app.mount("/surface", AuthMiddleWare(WSGIMiddleware(surface_application))) + # if settings.MCH_API_ENABLED is True: + # app.mount("/mch", AuthMiddleWare(WSGIMiddleware(mch_api_application))) + # if settings.CLIMSOFT_API_ENABLED is True: + # app.mount("/climsoft", AuthMiddleWare(climsoft_app)) + # app.mount("/pygeoapi", AuthMiddleWare(WSGIMiddleware(pygeoapi_app))) + if settings.SURFACE_API_ENABLED is True: - app.mount("/surface", AuthMiddleWare(WSGIMiddleware(surface_application))) + app.mount("/surface", WSGIMiddleware(surface_application)) if settings.MCH_API_ENABLED is True: - app.mount("/mch", AuthMiddleWare(WSGIMiddleware(mch_api_application))) + app.mount("/mch", WSGIMiddleware(mch_api_application)) if settings.CLIMSOFT_API_ENABLED is True: - app.mount("/climsoft", AuthMiddleWare(climsoft_app)) - app.mount("/pygeoapi", AuthMiddleWare(WSGIMiddleware(pygeoapi_app))) + app.mount("/climsoft", climsoft_app) + app.mount("/pygeoapi", WSGIMiddleware(pygeoapi_app)) + app.include_router(router)