File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 'django.contrib.sessions' ,
3939 'django.contrib.messages' ,
4040 'django.contrib.staticfiles' ,
41+ 'corsheaders' ,
4142 'rest_framework' ,
4243 'django_filters' ,
4344 'versatileimagefield' ,
4748MIDDLEWARE = [
4849 'django.middleware.security.SecurityMiddleware' ,
4950 'django.contrib.sessions.middleware.SessionMiddleware' ,
51+ 'corsheaders.middleware.CorsMiddleware' ,
5052 'django.middleware.common.CommonMiddleware' ,
5153 'django.middleware.csrf.CsrfViewMiddleware' ,
5254 'django.contrib.auth.middleware.AuthenticationMiddleware' ,
139141 ('medium_square_crop' , 'crop__400x400' ),
140142 ('small_square_crop' , 'crop__50x50' )
141143 ]
142- }
144+ }
145+
146+ CORS_ALLOWED_ORIGINS = [
147+ "https://www.test-cors.org" ,
148+ ]
149+
150+
151+ CSRF_TRUSTED_ORIGINS = [
152+ 'www.test2-cors.org' ,
153+ ]
154+
155+ CORS_ALLOW_CREDENTIALS = True
You can’t perform that action at this time.
0 commit comments