lixnet 1.3.13 → 1.3.14
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/dist/lib/util/request.js +5 -1
- package/package.json +1 -1
package/dist/lib/util/request.js
CHANGED
|
@@ -246,7 +246,11 @@ export function wrapLixnetRequest(request, response) {
|
|
|
246
246
|
return new LixnetHeaders(snapshot, headerMut);
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
// `receiver` here is this Proxy itself, not `target`. Native accessor properties
|
|
250
|
+
// (e.g. Workers' `Request.prototype.cf`) are branded getters that check `this` is
|
|
251
|
+
// the real internal object — invoking them with the Proxy as receiver throws
|
|
252
|
+
// "Illegal invocation". Always dispatch getters against the real `target`.
|
|
253
|
+
return Reflect.get(target, prop, target);
|
|
250
254
|
},
|
|
251
255
|
});
|
|
252
256
|
}
|