I am building a proxy service that will forward all but one kind of a POST request to another server.
I was planning on using express-http-proxy
to do this but I can't find a way to modify the POST request on the fly.
For Example:
I want to catch all POST requests to /getdata
and check if they have a field called username
,
if they do I want to replace it with a custom username and then forward the request to another server and then forward the response from it back to the user.
Any help is appreciated. Any package or resource would help. Thanks.