|
@@ -160,6 +160,26 @@
|
|
|
|
|
|
#migration
|
|
|
|
|
|
+### [CROS](https://github.com/ottoyiu/django-cors-headers/)
|
|
|
+ pip install django-cors-headers==2.1.0
|
|
|
+
|
|
|
+
|
|
|
+ #configuration
|
|
|
+ INSTALLED_APPS = (
|
|
|
+ ...
|
|
|
+ 'corsheaders',
|
|
|
+ ...
|
|
|
+ )
|
|
|
+
|
|
|
+ MIDDLEWARE = [ # Or MIDDLEWARE_CLASSES on Django < 1.10
|
|
|
+ ...
|
|
|
+ 'corsheaders.middleware.CorsMiddleware',
|
|
|
+ 'django.middleware.common.CommonMiddleware',
|
|
|
+ ...
|
|
|
+ ]
|
|
|
+
|
|
|
+ CORS_ORIGIN_ALLOW_ALL = True
|
|
|
+
|
|
|
|
|
|
|
|
|
|