I am setting up a reverse proxy server with node-http-proxy and wanted to know how to pass in a variable to change the outbound request on a per-request basis. I want to make all my calls to the proxy server located at http://localhost:8000
and pass in an "extension" of sorts to the target url of the outbound requests.
For example, the target url of the real server the proxy server is calling on is at http://localhost:9999
, and I want to add an extension of /config
to that url. So from my front end I would fetch from http://localhost:8000
and pass in the /config
extension, and the proxy server would call http://localhost:9999/config
for this particular case. Does anyone know how I might go about passing in this string?
Thank you for your help.