Only look at cookies if they are available

This commit is contained in:
Ritchie Martori 2013-12-11 16:42:47 -08:00
parent 0f4e9e1d1c
commit ad58a8ec13
1 changed files with 6 additions and 5 deletions

View File

@ -174,6 +174,7 @@ function tokenIdForRequest(req, options) {
}
}
if(req.signedCookies) {
for(i = 0, length = headers.length; i < length; i++) {
id = req.signedCookies[cookies[i]];
@ -181,6 +182,6 @@ function tokenIdForRequest(req, options) {
return id;
}
}
}
return null;
}