mirror of https://github.com/snachodog/mybuddy.git
Add Gitpod config for CSRF origin
Supports CSRF with Django 4+ (Baby Buddy v1.10.0+). See #393.
This commit is contained in:
parent
741548edf2
commit
26fa988fe6
|
@ -6,7 +6,7 @@ tasks:
|
||||||
gulp migrate &&
|
gulp migrate &&
|
||||||
gulp createcachetable
|
gulp createcachetable
|
||||||
env:
|
env:
|
||||||
DJANGO_SETTINGS_MODULE: babybuddy.settings.development
|
DJANGO_SETTINGS_MODULE: babybuddy.settings.gitpod
|
||||||
command: gulp
|
command: gulp
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
!base.py
|
!base.py
|
||||||
!ci.py
|
!ci.py
|
||||||
!development.py
|
!development.py
|
||||||
|
!gitpod.py
|
||||||
!heroku.py
|
!heroku.py
|
||||||
!production.example.py
|
!production.example.py
|
||||||
!test.py
|
!test.py
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
from .development import *
|
||||||
|
|
||||||
|
# CSRF configuration
|
||||||
|
# https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS
|
||||||
|
# https://www.gitpod.io/docs/environment-variables/#default-environment-variables
|
||||||
|
|
||||||
|
CSRF_TRUSTED_ORIGINS = [
|
||||||
|
os.environ.get("GITPOD_WORKSPACE_URL").replace("https://", "https://8000-")
|
||||||
|
]
|
Loading…
Reference in New Issue