Add X-OpenStack-Request-Id header
Make sure request id is returned in the X-OpenStack-Request-Id response header so that clients/users can determine the id used to look up corresponding logs. Change-Id: Ied7b98629423545c23ce664b22525f3d8fb9d253 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
5
releasenotes/notes/request-id-cbc8150626c0ccc3.yaml
Normal file
5
releasenotes/notes/request-id-cbc8150626c0ccc3.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Now API returnes unique request identifier string in
|
||||
the ``X-OpenStack-Request-Id`` header.
|
@@ -18,6 +18,7 @@ import socket
|
||||
from wsgiref import simple_server
|
||||
|
||||
from oslo_log import log as logging
|
||||
from oslo_middleware import request_id
|
||||
from oslo_utils import netutils
|
||||
|
||||
from zaqar.common import decorators
|
||||
@@ -148,6 +149,8 @@ class Driver(transport.DriverBase):
|
||||
|
||||
self.app = auth.SignedAndExtraSpecHeadersAuth(self.app, auth_app)
|
||||
|
||||
self.app = request_id.RequestId(self.app)
|
||||
|
||||
# NOTE(wangxiyuan): Install CORS, this middleware should be called
|
||||
# before Keystone auth.
|
||||
self.app = cors.install_cors(self.app, auth_app, self._conf)
|
||||
|
Reference in New Issue
Block a user