Skip to content

Commit

Permalink
add health to auth-free endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Nov 17, 2023
1 parent fd40051 commit 178ed4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ def require_login() -> ResponseReturnValue | None:
Blueprint "None" is needed for "/static/*" GET requests.
"""
if current_user.is_anonymous and request.blueprint not in ("login", 'api', None):
if current_user.is_anonymous and request.blueprint not in (
"login",
"api",
"health",
None,
):
lm = t.cast(LoginManager, current_app.login_manager) # type: ignore[attr-defined]
return lm.unauthorized()
return None
Expand Down

0 comments on commit 178ed4d

Please sign in to comment.