mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Added request id header (#9122)
no issue - be able to track a request through different systems - case insensitive - manual test only
This commit is contained in:
parent
d77e000113
commit
8c54f3cca9
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user