-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxyReq.setHeader doesn't seem to work #889
Comments
Hi there, It works with my code. There should be something else. I'm using it like.. proxy.on('proxyReq', function proxyRequestReceiver(proxyRequest, request) {
var chunks = [];
request.on('data', function proxyRequestData(chunk) {
chunks.push(chunk);
});
request.on('error', function proxyRequestError() {
console.log('request on error');
});
proxyRequest.setHeader('host', self.host.hostname);
...
...
}); |
does this also work with custom headers? And should it be all lower cases? Or should the example in the README work like it's explained there? |
In node, headers are automatically lowercased. On Sat, Oct 31, 2015 at 10:00 AM, Jens Claes notifications@github.com
Jarrett Cruger |
But would it work if you override headers with caps, as is done in the readme and in the description of my issue? |
Got to the same point. Blindly trusted README |
@entropitor Does this bug still exist? Meanwhile, do you know why you header hasn't been set? |
The example
from the readme doesn't seem to work. It just uses the header from the req (or leaves it out if the request header was empty).
The text was updated successfully, but these errors were encountered: