cont.
This commit is contained in:
parent
a679a623a1
commit
baeceb9c1e
|
|
@ -10,16 +10,12 @@ app.use('/build', express.static('build'));
|
|||
const options = (target) => {
|
||||
return {
|
||||
target: target,
|
||||
changeOrigin: true, // 允许在请求头中更改主机
|
||||
changeOrigin: false, // 允许在请求头中更改主机
|
||||
timeout: 30000,
|
||||
// 只改head版本不需要重写ua
|
||||
// headers: {
|
||||
// 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0'
|
||||
// }
|
||||
};
|
||||
}
|
||||
|
||||
const proxy = createProxyMiddleware(options('http://127.0.0.1:8081'));
|
||||
const proxy = createProxyMiddleware(options('http://localhost:8081'));
|
||||
|
||||
|
||||
// 设置代理
|
||||
|
|
|
|||
Loading…
Reference in New Issue