File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
backend/family_tree/family_tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 40
40
'django.contrib.sessions' ,
41
41
'django.contrib.messages' ,
42
42
'django.contrib.staticfiles' ,
43
+ 'corsheaders' ,
43
44
]
44
45
45
46
MIDDLEWARE = [
50
51
'django.contrib.auth.middleware.AuthenticationMiddleware' ,
51
52
'django.contrib.messages.middleware.MessageMiddleware' ,
52
53
'django.middleware.clickjacking.XFrameOptionsMiddleware' ,
54
+ 'corsheaders.middleware.CorsMiddleware' ,
53
55
]
54
56
55
57
ROOT_URLCONF = 'family_tree.urls'
72
74
73
75
WSGI_APPLICATION = 'family_tree.wsgi.application'
74
76
77
+ # CORS
78
+
79
+ CORS_ORIGIN_WHITELIST = [
80
+ 'http://localhost:3000' ,
81
+ 'https://localhost:3000' ,
82
+ 'http://127.0.0.1:3000' ,
83
+ 'https://127.0.0.1:3000' ,
84
+ ]
85
+
86
+ CORS_ALLOW_CREDENTIALS = True
75
87
76
88
# Database
77
89
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
You can’t perform that action at this time.
0 commit comments