From 54536d3edd976fc386c15717c9a3efd8077b48e3 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Sun, 3 Nov 2019 16:10:01 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=A1=F0=9F=8D=9F=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/15281?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index c188e2b..ecd3748 100644 --- a/server.js +++ b/server.js @@ -47,7 +47,8 @@ app.get("/status", (req, res) => { // parse login and password from headers const b64auth = (req.headers.authorization || "").split(" ")[1] || ""; - const [_, login, password] = new Buffer(b64auth, 'base64').toString().match(/(.*):(.*)/) || []; // slightly modified as we use : in username + const [_, login, password] = + new Buffer(b64auth, "base64").toString().match(/(.*):(.*)/) || []; // slightly modified as we use : in username if ( !login || @@ -55,7 +56,7 @@ app.get("/status", (req, res) => { login !== auth.login || password !== auth.password ) { - console.log(login, password) + console.log(login, password); res.set("WWW-Authenticate", 'Basic realm="Authentication required"'); return res.status(401).send("Authentication required."); }