From 8c54f3cca980d745efc1a77708443134097830ba Mon Sep 17 00:00:00 2001 From: Katharina Irrgang Date: Mon, 9 Oct 2017 14:48:32 +0200 Subject: [PATCH] Added request id header (#9122) no issue - be able to track a request through different systems - case insensitive - manual test only --- core/server/middleware/log-request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/middleware/log-request.js b/core/server/middleware/log-request.js index 7cc185ac7e..5d9f40aab7 100644 --- a/core/server/middleware/log-request.js +++ b/core/server/middleware/log-request.js @@ -7,7 +7,7 @@ var uuid = require('uuid'), */ module.exports = function logRequest(req, res, next) { var startTime = Date.now(), - requestId = uuid.v1(); + requestId = req.get('X-Request-ID') || uuid.v1(); function logResponse() { res.responseTime = (Date.now() - startTime) + 'ms';