mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-06-08 05:29:52 +00:00
Update settings.py
This commit is contained in:
parent
c7f8cdf623
commit
8fe3bf10f5
@ -239,8 +239,16 @@ if FRONTEND_URL:
|
||||
'x-xsrf-token',
|
||||
'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('/')
|
||||
|
||||
if FRONTEND_URL.startswith('https://'):
|
||||
CSRF_COOKIE_SECURE = True
|
||||
SESSION_COOKIE_SECURE = True
|
||||
else:
|
||||
FRONTEND_URL = ''
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user