Allow CORS for localhost:8080
This commit is contained in:
parent
7045853679
commit
d3433924cb
2 changed files with 16 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
beautifulsoup4==4.9.3
|
||||
bs4==0.0.1
|
||||
Django==3.1.3
|
||||
requests==2.24.0
|
||||
cryptography==3.2.1
|
||||
djangorestframework==3.12.4
|
||||
beautifulsoup4
|
||||
bs4
|
||||
Django
|
||||
requests
|
||||
cryptography
|
||||
djangorestframework
|
||||
django-cors-headers
|
|
@ -40,6 +40,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'corsheaders',
|
||||
|
||||
# My Apps
|
||||
'app',
|
||||
|
@ -54,6 +55,8 @@ MIDDLEWARE = [
|
|||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
]
|
||||
|
||||
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
|
||||
|
@ -78,6 +81,12 @@ TEMPLATES = [
|
|||
},
|
||||
]
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://localhost:8080",
|
||||
"http://127.0.0.1:8080",
|
||||
"https://librus.fun/",
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'wulkanowy.wsgi.application'
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue