File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -116,19 +116,19 @@ function onBeforeRequest(details) {
116116 redirectCounter [ details . requestId ] += 1 ;
117117 log ( DBUG , "Got redirect id " + details . requestId +
118118 ": " + redirectCounter [ details . requestId ] ) ;
119+
120+ if ( redirectCounter [ details . requestId ] > 9 ) {
121+ log ( NOTE , "Redirect counter hit for " + canonical_url ) ;
122+ urlBlacklist [ canonical_url ] = true ;
123+ var hostname = tmpuri . hostname ( ) ;
124+ domainBlacklist [ hostname ] = true ;
125+ log ( WARN , "Domain blacklisted " + hostname ) ;
126+ return ;
127+ }
119128 } else {
120129 redirectCounter [ details . requestId ] = 0 ;
121130 }
122131
123- if ( redirectCounter [ details . requestId ] > 9 ) {
124- log ( NOTE , "Redirect counter hit for " + canonical_url ) ;
125- urlBlacklist [ canonical_url ] = true ;
126- var hostname = tmpuri . hostname ( ) ;
127- domainBlacklist [ hostname ] = true ;
128- log ( WARN , "Domain blacklisted " + hostname ) ;
129- return ;
130- }
131-
132132 var newuristr = null ;
133133
134134 var rs = all_rules . potentiallyApplicableRulesets ( a . hostname ) ;
You can’t perform that action at this time.
0 commit comments