本地header代理下面内容即可
headers: {
// 添加必要的请求头
'Host': '服务端域名',
'Origin': 'https://服务端域名,
'Referer': 'https://服务端域名
},
js
devServer: {
// 本地开发代理API地址
proxy: {
'^/file': {
target: 'https://服务端域名',
changeOrigin: true, // 是否需要跨域
secure: false, // https
ws: true,
pathRewrite: {
'^/file': ''
},
headers: {
// 添加必要的请求头
'Host': '服务端域名',
'Origin': 'https://服务端域名,
'Referer': 'https://服务端域名
},
},
}