/**
 * @return {Boolean}
 */
const filter = function (pathname, req) {
  return pathname.match('^/api') && req.method === 'GET';
};

const apiProxy = createProxyMiddleware(filter, {
  target: 'http://www.example.org',
});

相关文章:

  • 2021-08-10
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-04-03
  • 2021-09-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案