Consider a webpage that overrides the native fetch function
const originalFetch = fetch;
fetch = async function(...args) {
if (args[1]) {
args.headers.append('x-monitoring', 'true');
}
return originalFetch(...args);
}
using the network console in such a webpage will go through this code
AB#46933573