http-party / node-http-proxy

A full-featured http proxy for node.js
https://github.com/http-party/node-http-proxy
Other
13.88k stars 1.97k forks source link

can't rewrite request cookie #1234

Open stephenliu1944 opened 6 years ago

stephenliu1944 commented 6 years ago

I want to rewrite request cookie using following code, but didn't work.

proxy.on('proxyReq', function (proxyReq, req, res) {
    proxyReq.setHeader('cookie', 'SESSION=123');
});

And is there a way to find API of proxyReq Object?

andorfermichael commented 2 years ago

I would be interested in a solution too.