From 14c9632511a1177823494c85b5a2d347e99dbd52 Mon Sep 17 00:00:00 2001 From: alexeh Date: Tue, 9 Apr 2024 13:46:27 +0300 Subject: [PATCH] remove auth tmp --- api/app/auth/auth.py | 2 +- api/app/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/auth/auth.py b/api/app/auth/auth.py index baa3e7e7..68bdc5fe 100644 --- a/api/app/auth/auth.py +++ b/api/app/auth/auth.py @@ -13,7 +13,7 @@ class AuthMiddleware(BaseHTTPMiddleware): """Generic auth middleware.""" async def dispatch(self, request: Request, call_next): # noqa: D102 - if request.url.path == "/docs" or request.url.path == "/openapi.json" or request.url.path == "/health" or request.method == "OPTIONS": + if request.url.path == "/docs" or request.url.path == "/openapi.json" or request.url.path == "/health": return await call_next(request) request_token = request.headers.get("Authorization") if request_token and request_token.startswith("Bearer "): diff --git a/api/app/main.py b/api/app/main.py index 0fa7b71d..0e716937 100644 --- a/api/app/main.py +++ b/api/app/main.py @@ -24,7 +24,7 @@ def path_params(raster_filename: Annotated[str, Query(description="Raster filena # Use ORJSONResponse to handle serialization of NaN values. Normal Json fails to serialize NaN values. app = FastAPI(title="Amazonia360 API", default_response_class=ORJSONResponse) app.add_middleware(CORSMiddleware, allow_origins=["*"], allow_methods=["*"], allow_headers=["*"]) -app.add_middleware(AuthMiddleware) +# app.add_middleware(AuthMiddleware) routes = ZonalTilerFactory(path_dependency=path_params) app.include_router(routes.router)