Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #12256 from bsclifton/fix/c63httpse
Browse files Browse the repository at this point in the history
Don't ignore internal requests in app/filtering
  • Loading branch information
bsclifton committed Dec 15, 2017
1 parent 21ea0c9 commit cdf69d8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions app/filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,11 +674,6 @@ module.exports.initPartition = initPartition
const filterableProtocols = ['http:', 'https:', 'ws:', 'wss:', 'magnet:', 'file:']

function shouldIgnoreUrl (details) {
// internal requests
if (details.tabId === -1) {
return true
}

// data:, is a special origin from SecurityOrigin::urlWithUniqueSecurityOrigin
// and usually occurs when there is an https in an http main frame
if (details.firstPartyUrl === 'data:,') {
Expand Down Expand Up @@ -860,10 +855,10 @@ module.exports.getMainFrameUrl = (details) => {
return details.url
}
const tab = webContents.fromTabID(details.tabId)
if (tab && !tab.isDestroyed()) {
try {
return tab.getURL()
}
return null
} catch (ex) {}
return details.firstPartyUrl || null
}

module.exports.alwaysAllowFullscreen = () => {
Expand Down

0 comments on commit cdf69d8

Please sign in to comment.