Skip to content

Executing requests in a page with overriden native functions #99

@Meir017

Description

@Meir017

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtrackedIssue is tracked on the team's ADO backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions