mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
Update settings.py
This commit is contained in:
@@ -239,8 +239,16 @@ if FRONTEND_URL:
|
|||||||
'x-xsrf-token',
|
'x-xsrf-token',
|
||||||
'x-requested-with',
|
'x-requested-with',
|
||||||
]
|
]
|
||||||
CSRF_TRUSTED_ORIGINS = [urlparse(FRONTEND_URL).hostname]
|
frontend_domain = urlparse(FRONTEND_URL).hostname
|
||||||
|
CSRF_TRUSTED_ORIGINS = [frontend_domain]
|
||||||
|
SESSION_COOKIE_DOMAIN = frontend_domain
|
||||||
|
CSRF_COOKIE_DOMAIN = frontend_domain
|
||||||
|
|
||||||
FRONTEND_URL = FRONTEND_URL.rstrip('/')
|
FRONTEND_URL = FRONTEND_URL.rstrip('/')
|
||||||
|
|
||||||
|
if FRONTEND_URL.startswith('https://'):
|
||||||
|
CSRF_COOKIE_SECURE = True
|
||||||
|
SESSION_COOKIE_SECURE = True
|
||||||
else:
|
else:
|
||||||
FRONTEND_URL = ''
|
FRONTEND_URL = ''
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user