This is for a NodeJS, Express application.
I want to take a request coming into a path like https://mycompany.com/cost-recovery -> http://mycompany.com:8447/cost-recovery. I wish to pass all headers, request bodies, etc. over to this forwarded host. Essentially the only thing I'm doing is changing the port.
I looked at http-proxy-middleware, but wasn't sure how to approach this. I wasn't sure what the router option does. Also, if there are any query strings I'm not sure they'll get passed. The problem with this service is that it doesn't look like I can take an incoming request and generate the proxy. Or at least, I don't know how. If I could, I'd build the proxy as a handler based on the incoming request.
Not looking for a full coding snippet, just a clue on what section to look for. Or if you do have an example, I'd like to see it.