Skip to content

Commit

Permalink
Merge pull request #176 from Sklup55/patch-2
Browse files Browse the repository at this point in the history
updates made for lab to run without 'CSRF errors'
  • Loading branch information
lavskillup committed Jan 8, 2024
2 parents 149265a + abcc6f6 commit 9803c53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/djangobackend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

APPEND_SLASH = True

ALLOWED_HOSTS = ["localhost"]
ALLOWED_HOSTS = ['localhost','<Your app URL>']

CSRF_TRUSTED_ORIGINS = ['<Your app URL>']


# Application definition
Expand All @@ -46,7 +48,6 @@
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
Expand Down

0 comments on commit 9803c53

Please sign in to comment.