Add CORS whitelist
This commit is contained in:
@@ -45,6 +45,7 @@ INSTALLED_APPS = [
|
||||
'allauth',
|
||||
'allauth.account',
|
||||
'rest_auth.registration',
|
||||
'corsheaders',
|
||||
]
|
||||
|
||||
SITE_ID = 1
|
||||
@@ -79,7 +80,12 @@ REST_FRAMEWORK = {
|
||||
'PAGE_SIZE': 10
|
||||
}
|
||||
|
||||
CORS_ORIGIN_WHITELIST = (
|
||||
'localhost:3000',
|
||||
)
|
||||
|
||||
MIDDLEWARE = [
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
Reference in New Issue
Block a user