File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 3737SECRET_KEY = os .getenv ("SECRET_KEY" )
3838
3939DJANGO_ALLOWED_HOSTS = os .getenv ("DJANGO_ALLOWED_HOSTS" , "" )
40+ ALLOW_ALL_HOSTS = os .getenv ("ALLOW_ALL_HOSTS" , "false" )
4041
4142# SECURITY WARNING: don't run with debug turned on in production!
4243DEBUG = DJANGO_ENV == "dev"
5657if DJANGO_ALLOWED_HOSTS :
5758 ALLOWED_HOSTS .extend (DJANGO_ALLOWED_HOSTS .split ("," ))
5859
60+ if ALLOW_ALL_HOSTS .lower () == "true" :
61+ ALLOWED_HOSTS = ["*" ]
62+
5963CORS_ALLOWED_ORIGINS = [
6064 "http://127.0.0.1:5173" ,
6165 "http://localhost:5173" ,
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ MONGO_USER = bwwc
1616MONGO_PASSWORD = mongo
1717MONGO_DB = bwwc
1818MONGO_PARAMS = " "
19- DJANGO_ALLOWED_HOSTS = " "
19+ DJANGO_ALLOWED_HOSTS = " "
20+ ALLOW_ALL_HOSTS = false
Original file line number Diff line number Diff line change @@ -17,4 +17,5 @@ MONGO_USER = bwwc
1717MONGO_PASSWORD = mongo
1818MONGO_DB = bwwc
1919MONGO_PARAMS = " "
20- DJANGO_ALLOWED_HOSTS = " "
20+ DJANGO_ALLOWED_HOSTS = " "
21+ ALLOW_ALL_HOSTS = false
You can’t perform that action at this time.
0 commit comments