You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
536 B
14 lines
536 B
module.exports = {
|
|
devServer: {
|
|
proxy: {
|
|
'/api': { // 你的目标服务器的请求路径前缀
|
|
target: 'https://hwjb.homilychart.com', // 目标服务器的地址
|
|
changeOrigin: true, // 是否跨域
|
|
secure: false, // 如果是https接口,需要配置这个参数
|
|
pathRewrite: {
|
|
'^/': '/testApi' // 将 /api 替换为 /testApi,以便正确请求目标服务器的资源
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|