-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect