Edit config/settings.py via Editor
This commit is contained in:
parent
6aa80a21bb
commit
901f6146fe
@ -23,19 +23,19 @@ DEBUG = os.getenv("DJANGO_DEBUG", "true").lower() == "true"
|
|||||||
ALLOWED_HOSTS = [
|
ALLOWED_HOSTS = [
|
||||||
"127.0.0.1",
|
"127.0.0.1",
|
||||||
"localhost",
|
"localhost",
|
||||||
os.getenv("HOST_FQDN", ""),
|
"shinastore.flatlogic.app", # Tambahin domain lo di sini
|
||||||
]
|
"*", # Tanda bintang ini buat bolehin semua (biar cepet fix)
|
||||||
|
]
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
CSRF_TRUSTED_ORIGINS = [
|
||||||
origin for origin in [
|
origin for origin in [
|
||||||
os.getenv("HOST_FQDN", ""),
|
os.getenv("HOST_FQDN", ""),
|
||||||
os.getenv("CSRF_TRUSTED_ORIGIN", "")
|
os.getenv("CSRF_TRUSTED_ORIGIN", "")
|
||||||
] if origin
|
] if origin
|
||||||
]
|
]
|
||||||
CSRF_TRUSTED_ORIGINS = [
|
CCSRF_TRUSTED_ORIGINS = [
|
||||||
f"https://{host}" if not host.startswith(("http://", "https://")) else host
|
"https://shinastore.flatlogic.app",
|
||||||
for host in CSRF_TRUSTED_ORIGINS
|
"http://shinastore.flatlogic.app",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Cookies must always be HTTPS-only; SameSite=Lax keeps CSRF working behind the proxy.
|
# Cookies must always be HTTPS-only; SameSite=Lax keeps CSRF working behind the proxy.
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user