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.
@@ -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
- // This doesn't happen in undici (in most cases) because undici, by default,
265
- // has no concept of origin.
266
- if (serializedOrigin === 'client') {
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "6.19.0",
3
+ "version": "6.19.1",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {