From 34c64c73e191107b2a8c6a614f4a4621875022fb Mon Sep 17 00:00:00 2001 From: Nikita Gusakov Date: Mon, 18 May 2015 03:24:42 +0300 Subject: [PATCH] Use native comparison instead of regexp --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index bcba250..3f933df 100644 --- a/lib/index.js +++ b/lib/index.js @@ -73,7 +73,7 @@ function authorize(options, onConnection) { var scheme = parts[0], credentials = parts[1]; - if (/^Bearer$/i.test(scheme)) { + if (scheme === 'Bearer') { token = credentials; } } else {