http-proxy-middleware做代理时,自定义复杂的匹配规则
/**
* @return {Boolean}
*/
const filter = function (pathname, req) {
return pathname.match('^/api') && req.method === 'GET';
};
const apiProxy = createProxyMiddleware(filter, {
target: 'http://www.example.org',
});