Implement managed browser security, individual agents and observability

This commit is contained in:
Karl committed 2026-10-13 16:58:15 +02:00
1 parent ff482ebe23
commit ea448de2d4
172 files changed
+5404 -347

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
'use strict';
// A new top-level GET belongs to the live native tab, not the document it leaves.
// Data-bearing requests still belong to the exact original document generation.
function requestSourceCurrent({details,source,token,registry,currentDocument}){
try{
if(!token)return !(details.webContentsId>0);
if(details.resourceType==='mainFrame'&&details.method==='GET'&&!(details.uploadData?.length)){
const contents=token.webContents;
return !!source&&source.guarded===true&&source.view.webContents===contents&&!contents.isDestroyed()&&registry.fromContents(details.webContentsId)===source;
}
return currentDocument(token);
}catch{return false;}
}
module.exports={requestSourceCurrent};