undici 5.26.1 → 5.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/fetch/index.js +4 -0
- package/package.json +1 -1
package/lib/fetch/index.js
CHANGED
|
@@ -1200,6 +1200,10 @@ async function httpRedirectFetch (fetchParams, response) {
|
|
|
1200
1200
|
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
|
|
1201
1201
|
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
|
1202
1202
|
request.headersList.delete('authorization')
|
|
1203
|
+
|
|
1204
|
+
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
|
1205
|
+
request.headersList.delete('cookie')
|
|
1206
|
+
request.headersList.delete('host')
|
|
1203
1207
|
}
|
|
1204
1208
|
|
|
1205
1209
|
// 14. If request’s body is non-null, then set request’s body to the first return
|