Fix for first party context policy ignored on first load in new tabs (thanks ayi for reporting).
This commit is contained in:
parent
f05e935de7
commit
a703a075f4
|
@ -232,7 +232,10 @@
|
|||
// contextualData (e.g. a request details object) must contain a tab, a tabId or a documentUrl
|
||||
// (used as a fallback if tab's top URL cannot be retrieved, e.g. in service workers)
|
||||
let {tab, tabId, documentUrl, url} = contextualData;
|
||||
if (!tab) tab = tabId !== -1 && TabCache.get(tabId);
|
||||
if (!tab) {
|
||||
if (contextualData.type === "main_frame") return url;
|
||||
tab = tabId !== -1 && TabCache.get(tabId);
|
||||
}
|
||||
return tab && tab.url || documentUrl || url;
|
||||
},
|
||||
requestCan(request, capability) {
|
||||
|
|
Loading…
Reference in New Issue