From d306ed5fd879a87723d8255ad6f5bd28e326b36b Mon Sep 17 00:00:00 2001 From: fastlorenzo Date: Fri, 9 Dec 2022 00:17:07 +0100 Subject: [PATCH] Added conditional config Signed-off-by: fastlorenzo --- core/admin/mailu/configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 16df3a294a..42ed766850 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -165,7 +165,7 @@ def init_app(self, app): self.config['RATELIMIT_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/2' self.config['SESSION_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/3' - self.config['SESSION_COOKIE_SAMESITE'] = 'Lax' + self.config['SESSION_COOKIE_SAMESITE'] = 'Lax' if self.config['OIDC_ENABLED'] else 'Strict' self.config['SESSION_COOKIE_HTTPONLY'] = True if self.config['SESSION_COOKIE_SECURE'] is None: self.config['SESSION_COOKIE_SECURE'] = self.config['TLS_FLAVOR'] != 'notls'