Merge branch 'master' into settings

This commit is contained in:
Wyatt Johnson
2018-05-07 16:30:21 -06:00
committed by GitHub
+4
View File
@@ -3,5 +3,9 @@ const uuid = require('uuid/v1');
// Trace middleware attaches a request id to each incoming request.
module.exports = (req, res, next) => {
req.id = uuid();
// Add the context ID to the request as an HTTP header.
res.set('X-Talk-Trace-ID', req.id);
next();
};