Skip to content

Commit 7fdc660

Browse files
Merge pull request #30 from gnanarepo/ujjawal_core
allowed_hosts
2 parents eca71a8 + 5aa62c3 commit 7fdc660

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

aviso_core/settings.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@
2525

2626
DEBUG = 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

3933
INSTALLED_APPS = [
4034
'django.contrib.admin',

0 commit comments

Comments
 (0)