Skip to content

Commit

Permalink
healthcheck endpoint public
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Apr 8, 2024
1 parent 074a159 commit 1192d61
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions api/app/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ class AuthMiddleware(BaseHTTPMiddleware):
"""Generic auth middleware."""

async def dispatch(self, request: Request, call_next): # noqa: D102
if request.url.path == "/docs":
if request.url.path == "/docs" or request.url.path == "/openapi.json" or request.url.path == "/health":
return await call_next(request)

if request.url.path == "/openapi.json":
return await call_next(request)

request_token = request.headers.get("Authorization")
if request_token and request_token.startswith("Bearer "):
request_token = request_token.split("Bearer ")[1]
Expand Down

0 comments on commit 1192d61

Please sign in to comment.