cors
This commit is contained in:
parent
7860dffce0
commit
469c2c15c6
2 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,7 @@ INSTALLED_APPS = [
|
|||
'django_filters',
|
||||
'rest_framework',
|
||||
'suitablephones',
|
||||
'corsheaders',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -50,6 +51,11 @@ MIDDLEWARE = [
|
|||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
]
|
||||
|
||||
CORS_ORIGIN_WHITELIST = [
|
||||
"http://localhost:5173",
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'mysuitablephone.urls'
|
||||
|
|
|
@ -4,3 +4,4 @@ djangorestframework
|
|||
markdown
|
||||
django-filter
|
||||
psycopg2-binary
|
||||
django-cors-headers
|
||||
|
|
Loading…
Reference in a new issue