to change location headers try using res.location ()
proxy.on('proxyRes', function (proxyRes, req, res) { res.location('http:/c/d/'); });
res.location just sets the response header. It does not set the response status code or closes the response, so you can write the body of the response you want and you need to call res.end() yourself after.
Link : Express location , source
Hope this helps.
source share