add CSRF trusted origins to settings and docker-compose environment
This commit is contained in:
@@ -128,6 +128,9 @@ STATIC_ROOT = BASE_DIR / "staticfiles"
|
||||
USE_X_FORWARDED_HOST = True
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
|
||||
# CSRF Trusted Origins
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
env_file:
|
||||
- ./backand/.env
|
||||
environment:
|
||||
- HOSTS=bartool.ovh,localhost
|
||||
- CSRF_TRUSTED_ORIGINS=https://bartool.ovh
|
||||
- NODE_ENV=production
|
||||
volumes:
|
||||
- static_content:/app/staticfiles
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user