Browse Source

Default to not allowing API connections for privacy

Chris Adams 5 years ago
parent
commit
5a7caafb2f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      only_show_green_results.py

+ 5 - 1
only_show_green_results.py

@@ -30,6 +30,7 @@ name = gettext('Only show green hosted results')
 description = gettext('Any results not being hosted on green infrastructure will be filtered')
 default_on = True
 preference_section = 'privacy'
+allow_api_connections = False
 
 
 class GreenCheck:
@@ -60,7 +61,10 @@ class GreenCheck:
             if self.conn:
                 return self.check_in_db(parsed_domain)
             else:
-                return self.check_against_api(parsed_domain)
+                if allow_api_connections:
+                    return self.check_against_api(parsed_domain)
+                else:
+                    return false
 
     def get_domain_from_url(self, url=None):
         return urlparse(url).hostname