Skip to content

Commit

Permalink
Added request id header (#9122)
Browse files Browse the repository at this point in the history
no issue

- be able to track a request through different systems
- case insensitive
- manual test only
  • Loading branch information
kirrg001 authored and sebgie committed Oct 9, 2017
1 parent d77e000 commit 8c54f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/server/middleware/log-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 8c54f3c

Please sign in to comment.