mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-06 05:55:42 +00:00
feat: configure CSRF_TRUSTED_ORIGINS via environment variables for production domains
This commit is contained in:
@@ -11,6 +11,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- DEBUG=True
|
- DEBUG=True
|
||||||
- ALLOWED_HOSTS=*
|
- ALLOWED_HOSTS=*
|
||||||
|
- CSRF_TRUSTED_ORIGINS=https://raulrockbar.com.br,https://api.raulrockbar.com.br
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- /DATA/AppData/rrbec-api-django:/app
|
- /DATA/AppData/rrbec-api-django:/app
|
||||||
|
|||||||
@@ -39,7 +39,11 @@ SECRET_KEY = os.getenv(
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = os.getenv("DEBUG", "True") == "True"
|
DEBUG = os.getenv("DEBUG", "True") == "True"
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["*"]
|
CSRF_TRUSTED_ORIGINS = (
|
||||||
|
os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
|
||||||
|
if os.getenv("CSRF_TRUSTED_ORIGINS")
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|||||||
Reference in New Issue
Block a user