async def get_extra_data(self, request): return { 'request': { 'query_string': request.query_string, 'headers': dict(request.headers), 'url': request.path, 'method': request.method, 'scheme': request.scheme, 'env': { 'REMOTE_ADDR': tools.get_remote_ip(request), } } }
def remote_ip(self): return tools.get_remote_ip(self.request)