diff --git a/app/main.py b/app/main.py index b251a9c..22b6775 100644 --- a/app/main.py +++ b/app/main.py @@ -166,7 +166,9 @@ async def custom_app_exception_handler(request, e): os.environ["PYGEOAPI_KEY_GLOBAL"] = cfg.PYGEOAPI_KEY_GLOBAL PYGEOAPI_APP.add_middleware( - AuthorizerMiddleware, public_paths=["/openapi"], key_pattern="PYGEOAPI_KEY_" + AuthorizerMiddleware, + public_paths=[f"{cfg.FASTGEOAPI_CONTEXT}/openapi"], + key_pattern="PYGEOAPI_KEY_", ) security_schemes = [