Explorar o código

Update server.js

Ignore token if not configured
Jairo Caro-Accino Viciana %!s(int64=6) %!d(string=hai) anos
pai
achega
5012793f23
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/server.js

+ 1 - 1
lib/server.js

@@ -209,7 +209,7 @@ app._initializeHTTP = function() {
     }
     }
 
 
     // Auth the req
     // Auth the req
-    if (req.params.token !== client.token) {
+    if (client.token && req.params.token !== client.token) {
       res.sendStatus(401);
       res.sendStatus(401);
       return;
       return;
     } else {
     } else {