Skip to content

Commit

Permalink
fix: update allowed hosts and CSRF settings for production environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jumagu committed Dec 30, 2024
1 parent bffd7ba commit f342a00
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/home/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,20 @@
BASE_URL = config('BASE_URL', default=None)

ALLOWED_HOSTS = [
'.railway.app', # https://saas.prod.railway.app
'django-saas-prod.up.railway.app',
]
if DEBUG:
ALLOWED_HOSTS += [
'127.0.0.1',
'localhost',
'django-saas-prod.up.railway.app',
]

CSRF_TRUSTED_ORIGINS = ['https://django-saas-prod.up.railway.app']
CSRF_ALLOWED_ORIGINS = ['https://django-saas-prod.up.railway.app']
CORS_ORIGINS_WHITELIST = ['https://django-saas-prod.up.railway.app']

# Application definition

INSTALLED_APPS = [
# django-apps
'django.contrib.admin',
Expand Down

0 comments on commit f342a00

Please sign in to comment.