File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 102102)
103103
104104MIDDLEWARE_CLASSES = (
105+ 'corsheaders.middleware.CorsMiddleware' ,
105106 'django.middleware.common.CommonMiddleware' ,
106107 'django.contrib.sessions.middleware.SessionMiddleware' ,
107108 'django.contrib.auth.middleware.AuthenticationMiddleware' ,
141142 'rest_framework' ,
142143 'rest_framework.authtoken' ,
143144 'south' ,
145+ 'corsheaders' ,
144146 # Deis apps
145147 'api' ,
146148 'web' ,
161163
162164SOUTH_TESTS_MIGRATE = False
163165
166+ CORS_ORIGIN_ALLOW_ALL = True
167+
168+ CORS_ALLOW_HEADERS = (
169+ 'content-type' ,
170+ 'accept' ,
171+ 'origin' ,
172+ 'Authentication' ,
173+ )
174+
175+ CORS_EXPOSE_HEADERS = (
176+ 'X_DEIS_VERSION' ,
177+ 'X_DEIS_RELEASE' ,
178+ )
179+
164180REST_FRAMEWORK = {
165181 'DEFAULT_MODEL_SERIALIZER_CLASS' :
166182 'rest_framework.serializers.ModelSerializer' ,
Original file line number Diff line number Diff line change @@ -18,3 +18,4 @@ PyYAML==3.11
1818redis == 2.9.1
1919static == 1.0.2
2020South == 1.0
21+ django-cors-headers == 0.13
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ paramiko==1.14.1
1919psycopg2==2.5.4
2020python-etcd==0.3.0
2121South==1.0
22+ django-cors-headers==0.13
2223
2324# Deis client requirements
2425docopt==0.6.2
You can’t perform that action at this time.
0 commit comments