Skip to content

Commit

Permalink
Closes #1178
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisaljoudi committed Apr 7, 2015
1 parent 7cb6083 commit 1f3ff79
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/js/dynamic-net-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,23 +316,11 @@ Matrix.prototype.clearRegisters = function() {
/******************************************************************************/

var is3rdParty = function(srcHostname, desHostname) {
if ( desHostname === '*' ) {
if(desHostname === '*' || srcHostname === '*' || srcHostname === '') {
return false;
}

// This case occurs for matrix rendering
if ( srcHostname === '*' ) {
return false;
}
var srcDomain = domainFromHostname(srcHostname);

// This can very well occurs, for examples:
// - localhost
// - file-scheme
// etc.
if ( srcDomain === '' ) {
srcDomain = srcHostname !== '' ? srcHostname : desHostname;
}
var srcDomain = domainFromHostname(srcHostname) || srcHostname; // localhost, etc. don't have domain

if ( desHostname.slice(0 - srcDomain.length) !== srcDomain ) {
return true;
Expand Down

0 comments on commit 1f3ff79

Please sign in to comment.