Commit e461447f by lyh3024

fix

Change-Id: I196cc06fb97dcc69d38af3621f775ad67374bceb
parent 14171a52
......@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
from pathlib import Path
from neomodel import config
from corsheaders.defaults import default_headers
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
......@@ -46,9 +47,9 @@ INSTALLED_APPS = [
]
MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
......@@ -59,6 +60,10 @@ MIDDLEWARE = [
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_HEADERS = list(default_headers) + [
'token',
]
ROOT_URLCONF = 'knowledge_graph.urls'
TEMPLATES = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment