I have created a nodejs gateway server, in which based on url prefix, it proxy using express-http-proxy:1.5.1
to many other microservices like this
this.router.all(Routes.ABC, httpProxy(baseUrl.XYZ, {
parseReqBody: false,
}));
now one of my ms has apis that holds form-data
for that matter i need to set
parseReqBody : false
now if i do this, it will stop parsing body
for other apis on the same ms.
I tried passing function to this parseReqBody
so that based on Content-Type
header i can set it to true or false.
But it does not accept function, it needs direct boolean
value.
I want to make this prop false if there is form data otherwise it should parse the body.
And is there any way to work both?