Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxyReqBodyDecorator with multipart form data #474

Open
praneetha-ck-robo opened this issue Dec 28, 2020 · 0 comments
Open

proxyReqBodyDecorator with multipart form data #474

praneetha-ck-robo opened this issue Dec 28, 2020 · 0 comments

Comments

@praneetha-ck-robo
Copy link

How to use proxyReqBodyDecorator when dealing with multipart formData?
If it would be a normal json request, the following code would work. But when dealing with formData inside the proxy, how do you modify and send the same?

app.use('/proxy', proxy('www.google.com', {
  proxyReqBodyDecorator: function(bodyContent, srcReq) {
    return {
         ... bodyContent,
         'key1':srcReq. session.value1you edi
         'key2':srcReq. session.value2
    }
  }
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant