ChangkeYang 7 rokov pred
rodič
commit
3061e63760
1 zmenil súbory, kde vykonal 20 pridanie a 0 odobranie
  1. 20 0
      README.md

+ 20 - 0
README.md

@@ -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
+