wrangler
Version:
Command-line interface for all things Cloudflare Workers
14 lines (12 loc) • 351 B
JavaScript
function stripCfConnectingIPHeader(input, init) {
const request = new Request(input, init);
request.headers.delete("CF-Connecting-IP");
return request;
}
globalThis.fetch = new Proxy(globalThis.fetch, {
apply(target, thisArg, argArray) {
return Reflect.apply(target, thisArg, [
stripCfConnectingIPHeader.apply(null, argArray),
]);
},
});