File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1919
2020current_directory_path = os .path .dirname (os .path .abspath (__file__ ))
2121
22-
2322if DJANGO_ENV == "prod" :
2423 load_dotenv (os .path .join (current_directory_path , "../env/.env.prod" ))
2524else :
3736# SECURITY WARNING: keep the secret key used in production secret!
3837SECRET_KEY = os .getenv ("SECRET_KEY" )
3938
39+ DJANGO_ALLOWED_HOSTS = os .getenv ("DJANGO_ALLOWED_HOSTS" , "" )
40+
4041# SECURITY WARNING: don't run with debug turned on in production!
4142DEBUG = DJANGO_ENV == "dev"
4243
5253 "127.0.0.1" ,
5354]
5455
56+ if DJANGO_ALLOWED_HOSTS :
57+ ALLOWED_HOSTS .extend (DJANGO_ALLOWED_HOSTS .split ("," ))
58+
5559CORS_ALLOWED_ORIGINS = [
5660 "http://127.0.0.1:5173" ,
5761 "http://localhost:5173" ,
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ POSTGRES_USERNAME = postgres
1111POSTGRES_PASSWORD = postgres
1212POSTGRES_DATABASE = bwwc
1313MONGO_HOST = mongo
14- MONGO_PORT = 27017
14+ MONGO_PORT = 27017
15+ DJANGO_ALLOWED_HOSTS = " "
Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ POSTGRES_USERNAME = postgres
1212POSTGRES_PASSWORD = postgres
1313POSTGRES_DATABASE = bwwc
1414MONGO_HOST = localhost
15- MONGO_PORT = 27017
15+ MONGO_PORT = 27017
16+ DJANGO_ALLOWED_HOSTS = " "
You can’t perform that action at this time.
0 commit comments