From 3378e82ec75c7f41633dc906ddf9ad90ae873df2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 4 Sep 2021 13:45:50 +0200 Subject: [PATCH] root: fix is_secure with safari on debug environments Signed-off-by: Jens Langhammer --- authentik/root/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authentik/root/middleware.py b/authentik/root/middleware.py index bdba86421..cd56adf0f 100644 --- a/authentik/root/middleware.py +++ b/authentik/root/middleware.py @@ -24,7 +24,7 @@ class SessionMiddleware(UpstreamSessionMiddleware): # Since go does not consider localhost with http a secure origin # we can't set the secure flag. user_agent = request.META.get("HTTP_USER_AGENT", "") - if user_agent.startswith("authentik-outpost@"): + if user_agent.startswith("authentik-outpost@") or "safari" in user_agent.lower(): return False return True return False