From bb40ccc4b0476b1152eeba185ec754c85c334bc1 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 9 Sep 2021 11:58:27 +0200 Subject: [PATCH] normalize HOSTNAMES should be moved to python lib and normalized in start.py --- core/admin/mailu/configuration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py index 1f13f896..7405d81f 100644 --- a/core/admin/mailu/configuration.py +++ b/core/admin/mailu/configuration.py @@ -145,7 +145,9 @@ class ConfigManager(dict): self.config['SESSION_COOKIE_SAMESITE'] = 'Strict' self.config['SESSION_COOKIE_HTTPONLY'] = True self.config['PERMANENT_SESSION_LIFETIME'] = timedelta(hours=int(self.config['SESSION_LIFETIME'])) - self.config['HOSTNAME'] = self.config['HOSTNAMES'].split(',', 1)[0].strip() + hostnames = [host.strip() for host in self.config['HOSTNAMES'].split(',', 1)] + self.config['HOSTNAMES'] = ','.join(hostnames) + self.config['HOSTNAME'] = hostnames[0] # update the app config itself app.config = self