微信公众号 发布 接口405报错
问题: 本地没问题,发布到线上就报错405
定位: 代理
server: {
port: 8888,
host: '192.168.22ddd',
proxy: {
'/wxservice': {
target: 'httqqqqqqq/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/wxservice/, '')
},
'/baseService': {
target: 'qqqqqqqqqq',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/baseService/, '')
}
}
}
这里的代理需要运维再服务器配置,前面的 /baseService 名字改了就得配置