From 178ed4db840eddced4b5d28446b9e9e20781ade1 Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Fri, 17 Nov 2023 15:30:18 +0100 Subject: [PATCH] add health to auth-free endpoints --- web/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/app.py b/web/app.py index aac3fb389..ae4fd63df 100644 --- a/web/app.py +++ b/web/app.py @@ -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