Browse Source

try to fix cors

ilya_shyian 2 years ago
parent
commit
3d057c6ba7
1 changed files with 12 additions and 0 deletions
  1. 12 0
      store_back/settings.py

+ 12 - 0
store_back/settings.py

@@ -37,7 +37,19 @@ else:
 
 
 # Application definition
+CORS_ALLOWED_ORIGINS = [
+    "http://188.72.209.29",
+    "http://188.72.209.29:80",
+    "http://188.72.209.29:8000",
+    "http://localhost:8000",
+    "http://127.0.0.1:3000",
+]
 
+CORS_ALLOW_METHODS = [
+    "GET",
+    "POST",
+    "PUT",
+]
 INSTALLED_APPS = [
     'django.contrib.admin',
     'django.contrib.auth',