File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,6 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI:
3333 )
3434
3535 app .add_middleware (AddProcessTimeHeaderMiddleware )
36- app .add_middleware (
37- EnforceAuthMiddleware ,
38- public_endpoints = settings .public_endpoints ,
39- private_endpoints = settings .private_endpoints ,
40- default_public = settings .default_public ,
41- oidc_config_url = settings .oidc_discovery_url ,
42- )
4336
4437 if settings .openapi_spec_endpoint :
4538 app .add_middleware (
@@ -58,14 +51,22 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI:
5851 items_filter = settings .items_filter (),
5952 )
6053
54+ app .add_middleware (
55+ EnforceAuthMiddleware ,
56+ public_endpoints = settings .public_endpoints ,
57+ private_endpoints = settings .private_endpoints ,
58+ default_public = settings .default_public ,
59+ oidc_config_url = settings .oidc_discovery_url ,
60+ )
61+
6162 if settings .debug :
6263 app .add_api_route (
6364 "/_debug" ,
6465 lambda : {"settings" : settings },
6566 methods = ["GET" ],
6667 )
6768
68- # Catchall for remainder of the endpoints
69+ # Catchall for any endpoint
6970 proxy_handler = ReverseProxyHandler (upstream = str (settings .upstream_url ))
7071 app .add_api_route (
7172 "/{path:path}" ,
You can’t perform that action at this time.
0 commit comments