Merge pull request #341 from STRML/fixAccessTokenMutatedOptions

Fix a slowdown caused by mutation of an incoming accessToken option.
This commit is contained in:
Raymond Feng 2014-06-20 17:36:57 -07:00
commit 3672c59410
1 changed files with 3 additions and 5 deletions

View File

@ -191,11 +191,9 @@ function tokenIdForRequest(req, options) {
var length;
var id;
params.push('access_token');
headers.push('X-Access-Token');
headers.push('authorization');
cookies.push('access_token');
cookies.push('authorization');
params = params.concat(['access_token']);
headers = headers.concat(['X-Access-Token', 'authorization']);
cookies = cookies.concat(['access_token', 'authorization']);
for(length = params.length; i < length; i++) {
id = req.param(params[i]);