例如用http 库发起的这种请求
http({
url:'https://www.baidu.com/kkk/kkk',
methods:'get'
})
http-proxy-middleware 好像无法拦截
var filter = function (pathname, req) {
console.log(pathname)
return pathname.match('/restful');
}
app.use(proxyMiddleware(filter, {
target: 'https://www.baidu-test.com/',
changeOrigin: true,
}))
输出的pathname 没有相关的url