File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 5050 'django.contrib.sitemaps' ,
5151 'django.contrib.staticfiles' ,
5252 'rest_framework' ,
53+ 'corsheaders' ,
5354 'taggit' ,
5455 'allauth' ,
5556 'allauth.account' ,
108109 'whitenoise.middleware.WhiteNoiseMiddleware' ,
109110 'django.contrib.sessions.middleware.SessionMiddleware' ,
110111 'django.contrib.auth.middleware.AuthenticationMiddleware' ,
112+ 'corsheaders.middleware.CorsMiddleware' ,
111113 'django.middleware.common.CommonMiddleware' ,
112114 'django.middleware.csrf.CsrfViewMiddleware' ,
113115 'django.contrib.messages.middleware.MessageMiddleware' ,
@@ -380,6 +382,10 @@ def read_connection_config(config):
380382if CSP_FRAME_SRC is not None :
381383 CSP_FRAME_SRC = ast .literal_eval (CSP_FRAME_SRC )
382384
385+ CORS_ALLOWED_ORIGIN_PATTERNS = os .environ .get ('CORS_ALLOWED_ORIGIN_PATTERNS' , None )
386+ if CORS_ALLOWED_ORIGIN_PATTERNS is not None :
387+ CORS_ALLOWED_ORIGIN_REGEXES = ast .literal_eval (CORS_ALLOWED_ORIGIN_PATTERNS )
388+
383389# Internationalization
384390# https://docs.djangoproject.com/en/1.11/topics/i18n/
385391
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ django-appconf==1.0.2
77django-autofixture == 0.12.1
88django-compressor == 2.1.1
99django-core == 1.4.1
10+ django-cors-headers == 3.10.1
1011django-csp == 3.7
1112django-registration == 3.1.2
1213django-rq == 2.4.1
You can’t perform that action at this time.
0 commit comments