Merge pull request #2604 from strongloop/fix/lazy-cls
Fix token middleware to not trigger CLS init
This commit is contained in:
commit
3719ac4bb9
|
@ -124,7 +124,7 @@ function token(options) {
|
|||
TokenModel.findForRequest(req, options, function(err, token) {
|
||||
req.accessToken = token || null;
|
||||
rewriteUserLiteral(req, currentUserLiteral);
|
||||
var ctx = loopback.getCurrentContext();
|
||||
var ctx = req.loopbackContext;
|
||||
if (ctx) ctx.set('accessToken', token);
|
||||
next(err);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue