Fix allowed hosts
This commit is contained in:
parent
a6f0f8cd07
commit
f45f7bdac4
|
@ -16,7 +16,13 @@ DEBUG = CONFIG.get('KumiSystems', 'Debug', fallback=False)
|
|||
|
||||
HOST = CONFIG.get('KumiSystems', 'Host', fallback='localhost')
|
||||
ALLOWED_HOSTS = [HOST]
|
||||
CSRF_TRUSTED_ORIGINS = [f"https://{HOST}"]
|
||||
|
||||
if HOST.startswith("www."):
|
||||
ALLOWED_HOSTS.append(HOST[4:])
|
||||
else:
|
||||
ALLOWED_HOSTS.append(f"www.{HOST}")
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = [f"https://{HOST}" for HOST in ALLOWED_HOSTS]
|
||||
|
||||
SITE_ID = CONFIG.getint('KumiSystems', 'SiteID', fallback=1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue