import bs4
+from fba.helpers import blacklist
from fba.helpers import config
from fba.helpers import domain as domain_helper
from fba.helpers import tidyup
logger.debug("domain='%s',origin='%s' - CALLED!", domain, origin)
domain_helper.raise_on(domain)
+ if blacklist.is_blacklisted(domain):
+ raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+
peers = list()
# No CSRF by default, you don't have to add network.api_headers by yourself here
logger.debug("domain='%s - CALLED!", domain)
domain_helper.raise_on(domain)
- if not instances.is_registered(domain):
+ if blacklist.is_blacklisted(domain):
+ raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+ elif not instances.is_registered(domain):
raise Exception(f"domain='{domain}' is not registered but function is invoked.")
blocklist = list()
logger.debug("domain='%s',origin='%s' - CALLED!", domain, origin)
domain_helper.raise_on(domain)
+ if blacklist.is_blacklisted(domain):
+ raise Exception(f"domain='{domain}' is blacklisted but function is invoked.")
+
peers = list()
try: