Skip to content

manipulate request #618

Answered by chimurai
sdellava asked this question in Q&A
Discussion options

You must be logged in to vote

Think custom filtering is what you're looking for:
https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/context-matching.md#custom-filtering

You'll get something like:

createProxyMiddleware((path, req) => {
  return !req.url.includes("moon");  // requests with "moon" will be skipped
}, { target: 'https://my.target.node' });

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by sdellava
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants