Skip to content

Commit 8c3586a

Browse files
committed
Installed and enabled the 'corsheaders' package
1 parent c0bcb82 commit 8c3586a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

todo_list/settings.py

+4
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@
6060
'django.contrib.staticfiles',
6161
'rest_framework',
6262
'django_filters',
63+
'corsheaders',
6364
'apps.tasks',
6465
]
6566

6667
MIDDLEWARE = [
68+
'corsheaders.middleware.CorsMiddleware',
6769
'django.middleware.security.SecurityMiddleware',
6870
'django.contrib.sessions.middleware.SessionMiddleware',
6971
'django.middleware.common.CommonMiddleware',
@@ -146,6 +148,8 @@
146148

147149
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
148150

151+
CORS_ORIGIN_ALLOW_ALL = True
152+
149153
REST_FRAMEWORK = {
150154
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
151155
'PAGE_SIZE': 10,

0 commit comments

Comments
 (0)