+ CORS
This commit is contained in:
parent
35c7d2632b
commit
b599e9d6af
|
|
@ -32,6 +32,14 @@ ALLOWED_HOSTS = ["crm-poizonstore.ru", "127.0.0.1", "localhost", "45.84.227.72"]
|
||||||
|
|
||||||
INTERNAL_IPS = ["127.0.0.1"]
|
INTERNAL_IPS = ["127.0.0.1"]
|
||||||
|
|
||||||
|
CORS_ALLOWED_ORIGINS = [
|
||||||
|
"http://crm-poizonstore.ru/",
|
||||||
|
"https://crm-poizonstore.ru/",
|
||||||
|
|
||||||
|
"http://localhost:8001",
|
||||||
|
"https://localhost:8001",
|
||||||
|
]
|
||||||
|
|
||||||
AUTH_USER_MODEL = 'store.User'
|
AUTH_USER_MODEL = 'store.User'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -45,6 +53,7 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
|
||||||
|
'corsheaders',
|
||||||
'django_cleanup.apps.CleanupSelectedConfig',
|
'django_cleanup.apps.CleanupSelectedConfig',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'debug_toolbar',
|
'debug_toolbar',
|
||||||
|
|
@ -54,6 +63,7 @@ INSTALLED_APPS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
'corsheaders.middleware.CorsMiddleware',
|
||||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ Django==4.2.2
|
||||||
django-cleanup==8.0.0
|
django-cleanup==8.0.0
|
||||||
django-filter==23.2
|
django-filter==23.2
|
||||||
djangorestframework==3.14.0
|
djangorestframework==3.14.0
|
||||||
|
django-cors-headers==4.1.0
|
||||||
drf-extra-fields==3.5.0
|
drf-extra-fields==3.5.0
|
||||||
Pillow==9.5.0
|
Pillow==9.5.0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user