module.exports={
"devServer":{
"proxy":{
"api":{
"target":'http://localhost:3000',
"changeOrign":true,
"secure":false,
"pathRewrite":{
"^/api":''
}
}
}
}
}

该配置文件用于Webpack的开发服务器,设置了一个名为api的代理,将所有/api开头的请求转发到本地http://localhost:3000,开启changeOrigin支持跨域,并禁用HTTPS安全检查。
6564

被折叠的 条评论
为什么被折叠?



