about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--streaming/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/streaming/index.js b/streaming/index.js
index b020d59fc..627b677a8 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -199,8 +199,9 @@ if (cluster.isMaster) {
     }
 
     const authorization = req.get('Authorization');
+    const accessToken = req.query.access_token;
 
-    if (!authorization) {
+    if (!authorization && !accessToken) {
       const err = new Error('Missing access token');
       err.statusCode = 401;
 
@@ -208,7 +209,7 @@ if (cluster.isMaster) {
       return;
     }
 
-    const token = authorization.replace(/^Bearer /, '');
+    const token = authorization ? authorization.replace(/^Bearer /, '') : accessToken;
 
     accountFromToken(token, req, next);
   };