Commit e461447f by lyh3024

fix

Change-Id: I196cc06fb97dcc69d38af3621f775ad67374bceb
parent 14171a52
...@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ ...@@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
from pathlib import Path from pathlib import Path
from neomodel import config from neomodel import config
from corsheaders.defaults import default_headers
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
...@@ -46,9 +47,9 @@ INSTALLED_APPS = [ ...@@ -46,9 +47,9 @@ INSTALLED_APPS = [
] ]
MIDDLEWARE = [ MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
...@@ -59,6 +60,10 @@ MIDDLEWARE = [ ...@@ -59,6 +60,10 @@ MIDDLEWARE = [
CORS_ORIGIN_ALLOW_ALL = True CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_HEADERS = list(default_headers) + [
'token',
]
ROOT_URLCONF = 'knowledge_graph.urls' ROOT_URLCONF = 'knowledge_graph.urls'
TEMPLATES = [ 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