header 后端 cors

This commit is contained in:
caoqianming 2020-10-12 11:04:24 +08:00
parent 6b611e9e16
commit fd661bd06b
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
// create an axios instance
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
withCredentials: true, // send cookies when cross-domain requests
timeout: 300000 // request timeout
})

View File

@ -115,7 +115,7 @@ USE_L10N = True
USE_TZ = True
# 跨域配置
CORS_ALLOW_CREDENTIALS = False
CORS_ALLOW_CREDENTIALS = True
CORS_ORIGIN_ALLOW_ALL = True