新增站点跨域支持

This commit is contained in:
zmister 2022-05-24 11:09:10 +08:00
parent f346149606
commit f29bf00085
2 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,7 @@ INSTALLED_APPS = [
'app_api', # API APP
'django.contrib.sitemaps', # 站点地图
'rest_framework',
'corsheaders',
]
MIDDLEWARE = [
@ -66,6 +67,7 @@ MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',

View File

@ -14,4 +14,5 @@ mammoth==1.4.13
markdownify==0.6.0
selenium==3.141.0
webdriver_manager==3.3.0
PyYAML==5.4.1
PyYAML==5.4.1
django-cors-headers>=3.10.0