afbmq/dispatcher/webhook.py
def check_ip(self):
        """
        Check client IP. Accept requests only from FB servers.

        :return:
        """
        # For reverse proxy (nginx)
        forwarded_for = self.request.headers.get('X-Forwarded-For', None)
        if forwarded_for:
            return forwarded_for, _check_ip(forwarded_for)

        # For default method
        peer_name = self.request.transport.get_extra_info('peername')
        if peer_name is not None:
            host, _ = peer_name
            return host, _check_ip(host)

        # Not allowed and can't get client IP
        return None, False

        Check client IP. Accept requests only from FB servers.

        :return:
        
Check client IP. Accept requests only from FB servers.
Check client IP . Accept requests only from FB servers .
def check_ip(self):
        forwarded_for = self.request.headers.get('X-Forwarded-For', None)
        if forwarded_for:
            return forwarded_for, _check_ip(forwarded_for)
        peer_name = self.request.transport.get_extra_info('peername')
        if peer_name is not None:
            host, _ = peer_name
            return host, _check_ip(host)
        return None, False
def check_ip ( self ) : forwarded_for = self . request . headers . get ( 'X-Forwarded-For' , None ) if forwarded_for : return forwarded_for , _check_ip ( forwarded_for ) peer_name = self . request . transport . get_extra_info ( 'peername' ) if peer_name is not None : host , _ = peer_name return host , _check_ip ( host ) return None , False
Check client IP.
Check client IP .
"""
        Check client IP. Accept requests only from FB servers.

        :return:
        """ # For reverse proxy (nginx) # For default method # Not allowed and can't get client IP
None
self