参考地址 https://stackoverflow.com/questions/45714237/chrome-webrequest-redirect-data-urls
// background.jschrome.webRequest.onBeforeRequest.addListener( function (details) { const url = details.url
if(url == 'http://www.example.com') { return { redirectUrl: 'data:application/json; charset=utf-8,' + JSON.stringify({"a":1, "b": 2})
}
} return {cancel: false}
},
{urls: ["<all_urls>"]},
["blocking"]
)这种方法可能能结局local不能直接使用的问题