finally solved the csrf bug thing omg
This commit is contained in:
parent
dbd8425fc7
commit
3e275180cc
@ -1,4 +1,5 @@
|
||||
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] vf bloons.walter.lol
|
||||
DJANGO_CSRF_TRUSTED_ORIGINS=bloons.walter.lol
|
||||
DJANGO_SECRET_KEY=password123
|
||||
DJANGO_DEBUG=1
|
||||
SQL_ENGINE=django.db.backends.postgresql
|
||||
|
||||
@ -31,7 +31,7 @@ def load_insecure_key():
|
||||
|
||||
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY") or load_insecure_key()
|
||||
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(" ")
|
||||
CSRF_TRUSTED_ORIGINS = list(f"https://{x.replace('https://', '')}" for x in os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split(" "))
|
||||
CSRF_TRUSTED_ORIGINS = list(f"https://{x.replace('https://', '')}" for x in os.environ.get("DJANGO_CSRF_TRUSTED_ORIGINS", "*").split(" "))
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
|
||||
print(f"{DEBUG=}")
|
||||
|
||||
@ -14,6 +14,7 @@ services:
|
||||
- DJANGO_SECRET_KEY
|
||||
- DJANGO_ALLOWED_HOSTS
|
||||
- DJANGO_DEBUG
|
||||
- DJANGO_CSRF_TRUSTED_ORIGINS
|
||||
- SQL_ENGINE
|
||||
- SQL_DATABASE
|
||||
- SQL_USER
|
||||
|
||||
Loading…
Reference in New Issue
Block a user