44 lines
1.7 KiB
JavaScript
44 lines
1.7 KiB
JavaScript
|
/*
|
|||
|
* @FilePath: \daping\vue.config.js
|
|||
|
* @Author: 王路平
|
|||
|
* @文件版本: V1.0.0
|
|||
|
* @Date: 2023-01-29 15:16:36
|
|||
|
* @Description:
|
|||
|
*
|
|||
|
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
|||
|
*/
|
|||
|
const { defineConfig } = require('@vue/cli-service')
|
|||
|
module.exports = defineConfig(
|
|||
|
{
|
|||
|
transpileDependencies: true,
|
|||
|
devServer: {
|
|||
|
proxy: {
|
|||
|
[process.env.VUE_APP_BASE_API]: {
|
|||
|
// target: 'http://192.168.2.125:2222', // 想要请求的url地址
|
|||
|
target: 'http://8.130.165.100:9015',
|
|||
|
// target: 'http://192.168.110.238:9015',
|
|||
|
ws: true, // 是否要开启代理
|
|||
|
changeOrigin: true,
|
|||
|
pathRewrite: {
|
|||
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
|||
|
}
|
|||
|
// // 是否保留host头,默认为false,如果为false,就会保留,为true会覆盖
|
|||
|
// forward: 'xxx', // 官方给出的解释跟target一致,没用过...
|
|||
|
// // 下边都是官方给的解释...
|
|||
|
// xfwd: true/false, // 添加x-forwar标头
|
|||
|
// secure:true/false, // 是否验证SSL Certs
|
|||
|
// toProxy:true/false, // 传递绝对URL作为路径(对代理代理很有用)
|
|||
|
// prependPath:true/false, // 默认值:true 指定是否将目标的路径添加到代理路径
|
|||
|
// ignorePath:true/false, // 默认值:false 指定是否忽略传入请求的代理路径
|
|||
|
// localAddress:"xxx", // 要为传出连接绑定的本地接口字符串
|
|||
|
// agent:{}, // 传递给http(s).request的对象
|
|||
|
// ssl:{}, // 传递给https.createServer()的对象
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
)
|