Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async (details: Electron.OnHeadersReceivedDetails, callback: any) => {
updateResponseHeadersWithCSP(
{
url: details.url,
type: details.resourceType as any,
tabId: getTabByWebContentsId(window, details.webContentsId),
method: details.method,
statusCode: details.statusCode,
statusLine: details.statusLine,
requestId: details.id.toString(),
frameId: 0,
parentFrameId: -1,
timeStamp: details.timestamp,
},
engine.getCSPDirectives(
makeRequest(
{
sourceUrl: details.url,
async (details: Electron.OnHeadersReceivedListenerDetails, callback: any) => {
updateResponseHeadersWithCSP(
{
url: details.url,
type: details.resourceType as any,
tabId: getTabByWebContentsId(window, details.webContentsId),
method: details.method,
statusCode: details.statusCode,
statusLine: details.statusLine,
requestId: details.id.toString(),
frameId: 0,
parentFrameId: -1,
timeStamp: details.timestamp,
},
engine.getCSPDirectives(
makeRequest(
{
sourceUrl: details.url,