Repository URL to install this package:
Version:
4.2.29-4.2 ▾
|
# Copyright 2018 TrilioData Inc.
# All Rights Reserved.
"""Middleware that ensures x-dm-request-id
Dmapi's notion of request-id tracking predates any common idea, so the
original version of this header in OpenStack was
x-dm-request-id. Eventually we got oslo, and all other projects
implemented this with x-openstack-request-id.
However, x-dm-request-id was always part of our contract. The
following migrates us to use x-openstack-request-id as well, by using
the common middleware.
"""
from oslo_middleware import request_id
HTTP_RESP_HEADER_REQUEST_ID = 'x-dm-request-id'
class DmapiReqIdMiddleware(request_id.RequestId):
compat_headers = [HTTP_RESP_HEADER_REQUEST_ID]