undici 6.19.0 → 6.19.1
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/web/fetch/util.js +7 -4
- package/package.json +1 -1
package/lib/web/fetch/util.js
CHANGED
|
@@ -260,10 +260,13 @@ function appendRequestOriginHeader (request) {
|
|
|
260
260
|
// TODO: implement "byte-serializing a request origin"
|
|
261
261
|
let serializedOrigin = request.origin
|
|
262
262
|
|
|
263
|
-
// "'client' is changed to an origin during fetching."
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
|
|
263
|
+
// - "'client' is changed to an origin during fetching."
|
|
264
|
+
// This doesn't happen in undici (in most cases) because undici, by default,
|
|
265
|
+
// has no concept of origin.
|
|
266
|
+
// - request.origin can also be set to request.client.origin (client being
|
|
267
|
+
// an environment settings object), which is undefined without using
|
|
268
|
+
// setGlobalOrigin.
|
|
269
|
+
if (serializedOrigin === 'client' || serializedOrigin === undefined) {
|
|
267
270
|
return
|
|
268
271
|
}
|
|
269
272
|
|