Merge pull request #51 from danieldupriest/cors-fix
Reordered apps and middleware in settings.py, fixing CORS issue. I think Preston and I were the only ones to experience this issue, so I'm closing the PR. Feel free to test if you have access to Debian.
This commit is contained in:
commit
da878aedb4
1 changed files with 5 additions and 2 deletions
|
@ -38,10 +38,12 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'backend',
|
# 3rd party
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'users',
|
|
||||||
'corsheaders',
|
'corsheaders',
|
||||||
|
# local
|
||||||
|
'users',
|
||||||
|
'backend',
|
||||||
]
|
]
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
|
@ -52,6 +54,7 @@ REST_FRAMEWORK = {
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'corsheaders.middleware.CorsMiddleware',
|
'corsheaders.middleware.CorsMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
|
Loading…
Reference in a new issue