header 后端 cors
This commit is contained in:
parent
6b611e9e16
commit
fd661bd06b
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ USE_L10N = True
|
|||
USE_TZ = True
|
||||
|
||||
# 跨域配置
|
||||
CORS_ALLOW_CREDENTIALS = False
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
CORS_ORIGIN_ALLOW_ALL = True
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue