Beispiel #1
0
    def __call__(self, request):
        local.request = request
        request.request_id = local.get_http_request_id()

        response = self.get_response(request)
        response['X-Request-Id'] = request.request_id

        local.release()

        return response
Beispiel #2
0
 def process_response(self, request, response):
     response['X-Request-Id'] = request.request_id
     local.release()
     return response