From 34ffe2eb78e45be80a7ada2864bbe14e41d9352d Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 13 Nov 2026 08:34:52 -0600 Subject: [PATCH] One address (Marty 2026-11-13): www. and new. redirect 301 to downlinebanners.com (SITE_HOST), path and query kept Co-Authored-By: Claude Opus 5.5 --- server.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.js b/server.js index cf99633..9ec30e5 100644 --- a/server.js +++ b/server.js @@ -171,6 +171,9 @@ networksso.init({ self: 'bannerline', peer: 'iap', peerBase: () => C.iapBase, fr const server = http.createServer(async (req, res) => { const u = new URL(req.url, 'http://x'); const p = u.pathname; + // one address (Marty 2026-11-13: downlinebanners.com, not a subdomain): www. and new. move to the main domain, path and query kept + { const host = String(req.headers.host || '').toLowerCase().split(':')[0]; + if (C.isProd && host !== C.site && /(^|\.)downlinebanners\.com$/.test(host)) { res.writeHead(301, { Location: 'https://' + C.site + req.url, 'Cache-Control': 'no-store' }); return res.end(); } } try { // visitor cookie (used for rate limits only) const ck = cookies(req); const setVid = !ck['bl.vid'] && !isBot(req) ? cookie('bl.vid', crypto.randomBytes(9).toString('hex'), 365 * 86400, true) : null;