added corsheaders

This commit is contained in:
graks 2018-09-20 11:13:33 +01:00
parent 2fd5f08ca6
commit 6367b3e157
16 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'corsheaders',
'postings',
'django.contrib.admin',
'django.contrib.auth',
@ -46,6 +47,8 @@ MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
@ -71,6 +74,7 @@ TEMPLATES = [
WSGI_APPLICATION = 'RateMyCourse.wsgi.application'
CORS_ORIGIN_ALLOW_ALL = True
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases