Add CORS whitelist
This commit is contained in:
parent
870e48a516
commit
0ad016791e
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user