Avoid using fallback origins for main_frame loads.
This commit is contained in:
parent
63d173f632
commit
343d1e5d09
|
@ -357,12 +357,15 @@ var RequestGuard = (() => {
|
|||
|
||||
let normalizeRequest = request => {
|
||||
|
||||
function fakeOriginFromTab({tabId} = request) {
|
||||
function fakeOriginFromTab({tabId, type} = request) {
|
||||
if (type !== "main_frame") {
|
||||
let tab = tabId !== -1 && TabCache.get(tabId);
|
||||
if (tab) {
|
||||
return request.initiator = request.originUrl = request.documentUrl = tab.url;
|
||||
}
|
||||
}
|
||||
return request.initiator || request.originUrl;
|
||||
}
|
||||
|
||||
if ("initiator" in request && !("originUrl" in request)) {
|
||||
if (request.initiator === "null") {
|
||||
|
|
Loading…
Reference in New Issue