root: fix is_secure with safari on debug environments

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-04 13:45:50 +02:00
parent 126e43dea4
commit 3378e82ec7

View file

@ -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