← back to Fantasea Consulting
Add per-client login Daniel to fantasea auth gate
22a888c7bedfbd858e9cc7c097abbdcd918b5d18 · 2026-07-17 07:03:23 -0700 · Steve
Files touched
Diff
commit 22a888c7bedfbd858e9cc7c097abbdcd918b5d18
Author: Steve <steve@designerwallcoverings.com>
Date: Fri Jul 17 07:03:23 2026 -0700
Add per-client login Daniel to fantasea auth gate
---
server.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/server.js b/server.js
index e9cb929..89d1759 100644
--- a/server.js
+++ b/server.js
@@ -1,11 +1,13 @@
const express=require('express');const app=express();const PORT=process.env.PORT||9767;
-// Unified fleet Basic Auth gate — admin:DW2024! (override via BASIC_AUTH env).
+// Basic Auth gate — accepts the unified fleet cred plus per-client logins.
+// Extra pairs can be added via BASIC_AUTH_EXTRA env (comma-separated user:pass).
// Placed before express.static so it protects every route.
-const BASIC_AUTH=process.env.BASIC_AUTH||'admin:DW2024!';
-const EXPECTED='Basic '+Buffer.from(BASIC_AUTH).toString('base64');
+const CREDS=['admin:DW2024!','Daniel:Gins2026!']
+ .concat((process.env.BASIC_AUTH_EXTRA||'').split(',').map(s=>s.trim()).filter(Boolean));
+const ACCEPTED=new Set(CREDS.map(c=>'Basic '+Buffer.from(c).toString('base64')));
app.use((req,res,next)=>{
- if((req.headers.authorization||'')===EXPECTED) return next();
+ if(ACCEPTED.has(req.headers.authorization||'')) return next();
res.set('WWW-Authenticate','Basic realm="Fantasea"');
return res.status(401).send('Authentication required');
});
← cfcfc96 Gate fantasea-consulting behind unified fleet Basic Auth (ad
·
back to Fantasea Consulting
·
5x fleet sweep: add missing heygen-brandfilm.mp4 (page 404'd 9555170 →