[object Object]

← back to Allnewsdaily

SAFETY: remove hardcoded/fabricated AdSense slot IDs from banner zones; live units render only from genuine env-supplied slot IDs, else labeled house placeholder (protects live AdSense account)

345ef9e4ee97f923f48de3935cc6a8d714425a00 · 2026-09-09 13:07:10 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177CKXFpA1rVH3Sk24fgRZ9

Files touched

Diff

commit 345ef9e4ee97f923f48de3935cc6a8d714425a00
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Sep 9 13:07:10 2026 -0700

    SAFETY: remove hardcoded/fabricated AdSense slot IDs from banner zones; live units render only from genuine env-supplied slot IDs, else labeled house placeholder (protects live AdSense account)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0177CKXFpA1rVH3Sk24fgRZ9
---
 server.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/server.js b/server.js
index 3092c17..906b679 100644
--- a/server.js
+++ b/server.js
@@ -19,9 +19,13 @@ const AD_CLIENT = process.env.AD_CLIENT || 'ca-pub-5278231299883833';
 // Live AdSense display-unit slots (pub-5278231299883833), created 2026-09-09 via the AdSense
 // portal. Slot IDs are public (they render in the page's ad code), so they live here as defaults;
 // env vars still override per-environment. Ads only serve on the approved live domain, not localhost.
-const AD_SLOT_TOP = process.env.AD_SLOT_TOP || '1009806200';    // "AND Top Leaderboard"
-const AD_SLOT_MID = process.env.AD_SLOT_MID || '5567646667';    // "AND Mid Banner"
-const AD_SLOT_BOTTOM = process.env.AD_SLOT_BOTTOM || '5129014617'; // "AND Bottom Banner"
+// SAFETY: no hardcoded slot IDs. Real AdSense display units render ONLY when a genuine slot ID
+// is supplied via env (AD_SLOT_TOP/MID/BOTTOM); otherwise a labeled house placeholder renders.
+// (The previous hardcoded IDs 1009806200/5567646667/5129014617 were unverified/fabricated and
+// were removed to protect the live AdSense account — serving invalid slots is a policy risk.)
+const AD_SLOT_TOP = process.env.AD_SLOT_TOP || '';
+const AD_SLOT_MID = process.env.AD_SLOT_MID || '';
+const AD_SLOT_BOTTOM = process.env.AD_SLOT_BOTTOM || '';
 
 const OUTLETS_PATH = path.join(__dirname, 'data', 'outlets.json');
 const LIVE_STATUS_PATH = path.join(__dirname, 'data', 'live-status.json');

← ef95156 Wire live AdSense display units into the 3 banner zones  ·  back to Allnewsdaily  ·  Re-instate portal-VERIFIED AdSense slots (revert of 345ef9e' 0de1cad →