mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-06-09 05:59:53 +00:00
Update settings.py
This commit is contained in:
parent
f818dbf03e
commit
be5d360a9e
@ -2,6 +2,7 @@ import os
|
|||||||
import dj_database_url
|
import dj_database_url
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
@ -238,7 +239,7 @@ if FRONTEND_URL:
|
|||||||
'x-xsrf-token',
|
'x-xsrf-token',
|
||||||
'x-requested-with',
|
'x-requested-with',
|
||||||
]
|
]
|
||||||
CSRF_TRUSTED_ORIGINS = [FRONTEND_URL]
|
CSRF_TRUSTED_ORIGINS = [urlparse(FRONTEND_URL).hostname]
|
||||||
FRONTEND_URL = FRONTEND_URL.rstrip('/')
|
FRONTEND_URL = FRONTEND_URL.rstrip('/')
|
||||||
else:
|
else:
|
||||||
FRONTEND_URL = ''
|
FRONTEND_URL = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user