Enable CORS headers for /api/ endpoint. Also upgrade django to 2.1.7.
This commit is contained in:
parent
222cb74622
commit
e3ff8d876e
|
@ -45,6 +45,7 @@ INSTALLED_APPS = [
|
|||
|
||||
'graphene_django',
|
||||
'channels',
|
||||
'corsheaders',
|
||||
|
||||
'profiles',
|
||||
'camps',
|
||||
|
@ -127,6 +128,7 @@ BOOTSTRAP3 = {
|
|||
'javascript_url': '/static/js/bootstrap.min.js'
|
||||
}
|
||||
MIDDLEWARE = [
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
@ -136,6 +138,9 @@ MIDDLEWARE = [
|
|||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
CORS_URLS_REGEX = r'^/api/*$'
|
||||
|
||||
if DEBUG:
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
INSTALLED_APPS += [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Django==2.1.5
|
||||
Django==2.1.7
|
||||
channels==2.1.6
|
||||
channels-redis==2.3.2
|
||||
|
||||
|
@ -16,6 +16,8 @@ django-extensions==2.1.4
|
|||
django-wkhtmltopdf==3.2.0
|
||||
django-reversion==3.0.2
|
||||
django-betterforms==1.2
|
||||
django-cors-headers==2.5.0
|
||||
django-filter==2.1.0
|
||||
docopt==0.6.2
|
||||
future==0.17.1
|
||||
html5lib==1.0.1
|
||||
|
@ -37,5 +39,3 @@ venusian==1.2.0
|
|||
webencodings==0.5.1
|
||||
wrapt==1.11.1
|
||||
graphene-django==2.2.0
|
||||
django-filter==2.1.0
|
||||
|
||||
|
|
Loading…
Reference in a new issue