Use native comparison instead of regexp

This commit is contained in:
Nikita Gusakov 2015-05-18 03:24:42 +03:00
parent 78dcd15732
commit 34c64c73e1

View File

@ -73,7 +73,7 @@ function authorize(options, onConnection) {
var scheme = parts[0], var scheme = parts[0],
credentials = parts[1]; credentials = parts[1];
if (/^Bearer$/i.test(scheme)) { if (scheme === 'Bearer') {
token = credentials; token = credentials;
} }
} else { } else {