The endpoint behind a Hapi.js proxy is receiving duplicated "Content-Type" header on the following scenario:
a) settings.passThrough = true
b) the request to the proxy includes a "Content-Type" header
Looking at the code on proxy.js file, I found this:
//proxy.js, line: 54
if (settings.passThrough) {
options.headers = Hoek.clone(req.headers);
...
}
followed by this:
// proxy.js, line: 76
var contentType = req.headers['content-type'];
if (contentType) {
options.headers['Content-Type'] = contentType;
}
I think that, if the second section is really needed, it should consider the settings.passThrough option too.
The endpoint behind a Hapi.js proxy is receiving duplicated "Content-Type" header on the following scenario:
a) settings.passThrough = true
b) the request to the proxy includes a "Content-Type" header
Looking at the code on proxy.js file, I found this:
followed by this:
I think that, if the second section is really needed, it should consider the settings.passThrough option too.