update code

lrs-branch
bettleChen 1 year ago
parent ee2fc5dfd9
commit a7f7c27b28

@ -12,17 +12,13 @@ https://docs.djangoproject.com/en/2.2/ref/settings/
import os import os
<<<<<<< Updated upstream
=======
CORS_ALLOW_ORIGIN_WHITELIST = [ CORS_ALLOW_ORIGIN_WHITELIST = [
"http://localhost:8080", # 允许访问的来源 "http://localhost:8080", # 允许访问的来源
"http://localhost:8000", # 允许访问的来源 "http://localhost:8000", # 允许访问的来源
# 可以继续添加其他允许的来源 # 可以继续添加其他允许的来源
] ]
CORS_ALLOW_CREDENTIALS = True # 允许跨域请求携带凭据例如Cookies
>>>>>>> Stashed changes
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -65,7 +61,6 @@ MIDDLEWARE = [
'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware',
'corsheaders.middleware.CorsMiddleware', 'corsheaders.middleware.CorsMiddleware',
<<<<<<< Updated upstream
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
# 'API.middle.AuthMiddleware', # 'API.middle.AuthMiddleware',
] ]
@ -87,12 +82,6 @@ CORS_ALLOW_HEADERS = (
) )
=======
# 'API.middle.AuthMiddleware',
]
>>>>>>> Stashed changes
ROOT_URLCONF = 'EduSystemServer.urls' ROOT_URLCONF = 'EduSystemServer.urls'
TEMPLATES = [ TEMPLATES = [

Loading…
Cancel
Save