Make the site block check usable from plugins and core modules

Fixes https://github.com/HelloZeroNet/ZeroNet/issues/1888
This commit is contained in:
Vadim Ushakov 2021-03-23 23:12:54 +07:00
parent 6c8849139f
commit 1144964062
3 changed files with 13 additions and 0 deletions

View file

@ -155,6 +155,10 @@ class SiteManager(object):
def resolveDomainCached(self, domain):
return self.resolveDomain(domain)
# Checks if the address is blocked. To be implemented in content filter plugins.
def isAddressBlocked(self, address):
return False
# Return: Site object or None if not found
def get(self, address):
if self.isDomainCached(address):