fix [P-276]: csrf

This commit is contained in:
Nukeap committed 2025-07-31 11:44:04 +03:00
1 parent 30d515b9e0
commit cda61dd9cb
2 files changed
+8 -6

No files matched your search

+4
View File
@@ -56,3 +56,7 @@ NGINX_INTERNAL_PORT=80
RUN_WITH_DOCS=False
PRODUCTION=True
DJANGO_CSRF_TRUSTED_ORIGINS="http://localhost, http://portal-t, http://127.0.0.1, http://portal9966/"
DJANGO_ALLOWED_HOSTS="*, portal-t, portal9966, localhost, 0.0.0.0'
+4 -6
View File
@@ -38,12 +38,10 @@ SWAGGER_SETTINGS = {
}
}
}
CSRF_TRUSTED_ORIGINS = [
'http://localhost',
'http://127.0.0.1',
'http://yourdomain.com', # Add your production domain here
]
ALLOWED_HOSTS = ["*","portal-t",'portal9966','localhost','0.0.0.0']
ALLOWED_HOSTS = str(os.getenv('DJANGO_ALLOWED_HOSTS')).split(', ')
CSRF_TRUSTED_ORIGINS = str(os.getenv('DJANGO_CSRF_TRUSTED_ORIGINS')).split(', ')
CHANNEL_LAYERS = {
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",