From 70c4053201ae22a383ed722c2b7f4772bc8d86e8 Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 19 Sep 2026 05:50:02 -0500 Subject: [PATCH] Network Ad Space zone on the Faucet Wave and Tier One Ads landing pages Marty asked for a NAS zone on the two legacy squeeze pages (2026-09-19). Injected server-side in serveJoinPage for the fw-*/t1-* angles only, below the fine print and above the footer links; the regular join pages stay ad-free. script-src now allows networkadspace.com, which it did not, so the tag would otherwise have died silently under the CSP. Co-Authored-By: Claude Fable 5.1 --- server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 21e9075..7712d76 100644 --- a/server.js +++ b/server.js @@ -338,6 +338,10 @@ function serveJoinPage(res, tok, angle, ang, setCookies) { + ''; html = html.replace(/[^<]*<\/title>/, '<title>' + escA(title) + ' | InstantAdPay' + og); if (ang) html = html.replace('', ''); // angle pages: squeeze layout from the first paint + // Network Ad Space zone on the two legacy squeeze pages only (Marty, 2026-09-19): below the + // fine print, above the footer links. The regular join pages stay ad-free. + if (/^(fw|t1)-(adv|earn)$/.test(String(angle || ''))) html = html.replace('
', + '
' + '
'); const headers = { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store, must-revalidate' }; if (setCookies && setCookies.length) headers['Set-Cookie'] = setCookies; res.writeHead(200, baseHeaders(headers)); @@ -477,7 +481,7 @@ const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': ' '.png': 'image/png', '.jpg': 'image/jpeg', '.svg': 'image/svg+xml', '.webp': 'image/webp', '.ico': 'image/x-icon', '.json': 'application/json', '.mp4': 'video/mp4', '.woff2': 'font/woff2', '.gif': 'image/gif', '.webm': 'video/webm', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml; charset=utf-8' }; -const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ='; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:"; +const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://www.networkadspace.com https://networkadspace.com 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ='; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:"; function baseHeaders(extra) { return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff', 'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {});