diff --git a/fetch.js b/fetch.js index c70622cf..d33d6a47 100644 --- a/fetch.js +++ b/fetch.js @@ -599,6 +599,11 @@ export function fetch(input, init) { Object.getOwnPropertyNames(init.headers).forEach(function(name) { xhr.setRequestHeader(name, normalizeValue(init.headers[name])) }) + request.headers.forEach(function(value, name) { + if (!Object.prototype.hasOwnProperty.call(init.headers, normalizeName(name))) { + xhr.setRequestHeader(name, value) + } + }) } else { request.headers.forEach(function(value, name) { xhr.setRequestHeader(name, value)