def check_request_ip(self):
        """Check network block list, if any"""
        ban_networks = self.settings.get("ban_networks")
        if self.skip_check_request_ip or not ban_networks:
            return
        request_ip = self.request.remote_ip
        match = ip_in_networks(
            request_ip,
            ban_networks,
        )
        if match:
            network_spec = match
            message = ban_networks[network_spec]
            app_log.warning(
                f"Blocking request from {request_ip} matching banned network {network_spec}: {message}"
            )
            raise web.HTTPError(403, f"Requests from {message} are not allowed")
Check network block list, if any
binderhub/base.py