Skip to content

Commit

Permalink
Fix #1076
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Champion committed Jul 18, 2023
1 parent e3375eb commit c8c39c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c8c39c9

Please # to comment.