We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11f7f4c commit eaca85fCopy full SHA for eaca85f
core/settings.py
@@ -37,13 +37,15 @@
37
'django.contrib.messages',
38
'django.contrib.staticfiles',
39
40
+ 'corsheaders',
41
'rest_framework',
42
'api',
43
'api.user',
44
'api.authentication'
45
]
46
47
MIDDLEWARE = [
48
+ 'corsheaders.middleware.CorsMiddleware',
49
'django.middleware.security.SecurityMiddleware',
50
'django.contrib.sessions.middleware.SessionMiddleware',
51
'django.middleware.common.CommonMiddleware',
@@ -136,4 +138,8 @@
136
138
),
137
139
}
140
141
+CORS_ALLOWED_ORIGINS = [
142
+ "http://localhost:3000",
143
+ "http://127.0.0.1:3000"
144
+]
145
requirements.txt
@@ -1,3 +1,4 @@
1
Django==3.2.5
2
djangorestframework==3.12.4
3
-PyJWT==2.1.0
+PyJWT==2.1.0
4
+django-cors-headers==3.7.0
0 commit comments