File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 2525
2626DEBUG = os .environ .get ('DEBUG' , 'True' ) == 'True'
2727# --- LOGIC FOR ALLOWED HOSTS ---
28- if DEBUG :
29- # Local development
30- ALLOWED_HOSTS = ['*' ]
31- CSRF_TRUSTED_ORIGINS = ["http://localhost:8000" , "http://127.0.0.1:8000" ]
32- else :
33- ALLOWED_HOSTS = os .environ .get ('ALLOWED_HOSTS' , '' ).split (',' )
34- trusted_origins = os .environ .get ('TRUSTED_ORIGINS' , '' ).split (',' )
35- CSRF_TRUSTED_ORIGINS = [origin .strip () for origin in trusted_origins if origin .strip ()]
36-
37- # Application definition
28+
29+ ALLOWED_HOSTS = os .environ .get ('ALLOWED_HOSTS' , '' ).split (',' )
30+ trusted_origins = os .environ .get ('TRUSTED_ORIGINS' , '' ).split (',' )
31+ CSRF_TRUSTED_ORIGINS = [origin .strip () for origin in trusted_origins if origin .strip ()]
3832
3933INSTALLED_APPS = [
4034 'django.contrib.admin' ,
You can’t perform that action at this time.
0 commit comments