[object Object]

← back to Approvals Viewer

drop basic-auth (localhost-only tool)

33ba1030a7709c0873e0c124bf03c292bd2304cc · 2026-07-31 09:23:45 -0700 · steve

Files touched

Diff

commit 33ba1030a7709c0873e0c124bf03c292bd2304cc
Author: steve <steve@designerwallcoverings.com>
Date:   Fri Jul 31 09:23:45 2026 -0700

    drop basic-auth (localhost-only tool)
---
 server.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/server.js b/server.js
index cac9782..1c807bb 100644
--- a/server.js
+++ b/server.js
@@ -21,8 +21,7 @@ function listMemos(){return fs.readdirSync(QUEUE).filter(f=>f.endsWith('.md')&&!
 }).sort((a,b)=>new Date(b.mtime)-new Date(a.mtime));}
 function send(res,c,b,t='application/json'){res.writeHead(c,{'Content-Type':t});res.end(b);}
 http.createServer((req,res)=>{
- const h=req.headers.authorization||'';const [u,p]=Buffer.from(h.split(' ')[1]||'','base64').toString().split(':');
- if(u!==USER||p!==PASS){res.writeHead(401,{'WWW-Authenticate':'Basic realm="approvals"'});return res.end('auth');}
+ // auth disabled: 127.0.0.1-only local tool
  if(req.url==='/'||req.url==='/index.html')return send(res,200,fs.readFileSync(path.join(__dirname,'public/index.html')),'text/html');
  if(req.url==='/healthz')return send(res,200,'ok','text/plain');
  if(req.url==='/api/memos')return send(res,200,JSON.stringify(listMemos()));

← 65b30e1 pin approvals-swipe to stable port 9788  ·  back to Approvals Viewer  ·  approvals-viewer: re-enable Basic auth + pin default port 97 06062c8 →