Передавать заголовки при перенаправлении URL через расширение chrome - PullRequest
0 голосов
/ 17 апреля 2020

Я хочу передать заголовки и тело при перенаправлении URL-адреса с расширения chrome.

  function (details) {

    if (details.type == "xmlhttprequest") {
      let index = details.url.indexOf(".com");
      let redirect = "http://localhost:9010" + details.url.substring(index + 4)
      chrome.extension.getBackgroundPage().console.log(redirect);
      return { redirectUrl: redirect };
    }

  }, { urls: ["<all_urls>"] },
  ["blocking"]
);

...