Skip to content

Commit

Permalink
learn: add cors origin header
Browse files Browse the repository at this point in the history
  • Loading branch information
aapav01 committed Sep 9, 2023
1 parent 93a0ea9 commit 47cdc3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions learn/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

ALLOWED_HOSTS = ['*']

CORS_ALLOW_ALL_ORIGINS = True

# Application definition

Expand All @@ -49,11 +50,13 @@
'django_browser_reload',
'graphene_django',
'phonenumber_field',
"corsheaders",
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
"corsheaders.middleware.CorsMiddleware",
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
Expand Down

0 comments on commit 47cdc3a

Please sign in to comment.