1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-23 22:04:47 +02:00

normalize HOSTNAMES

should be moved to python lib and normalized in start.py
This commit is contained in:
Alexander Graf
2021-09-09 11:58:27 +02:00
parent 5a1e6dfb61
commit bb40ccc4b0

View File

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