[object Object]

← back to All Designerwallcoverings

Contrarian fixes: scope crawler cred to internal hosts only; correct zuber-internal note :10105; de-mislead quadrille internalViewer (public-served)

7e644210db906248e92bc193c3473742efc76a0f · 2026-07-14 09:53:02 -0700 · Steve Abrams

Files touched

Diff

commit 7e644210db906248e92bc193c3473742efc76a0f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jul 14 09:53:02 2026 -0700

    Contrarian fixes: scope crawler cred to internal hosts only; correct zuber-internal note :10105; de-mislead quadrille internalViewer (public-served)
---
 config/known-subdomains.json |  4 ++--
 scripts/crawl-microsites.js  | 10 +++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/config/known-subdomains.json b/config/known-subdomains.json
index 2ca5b3f..a1eddd5 100644
--- a/config/known-subdomains.json
+++ b/config/known-subdomains.json
@@ -30,7 +30,7 @@
    "knownProject": "~/Projects/quadrille-house-site",
    "note": "Local project built; deploy status tracked by probe",
    "hasMicrosite": true,
-   "internalViewer": "http://127.0.0.1:9947 (~/Projects/quadrille-internal, pm2 quadrille-internal)"
+   "internalViewer": "none — quadrille-showroom (pm2, :9938) has no /api feed; membership resolves via the public quadrille.designerwallcoverings.com subdomain"
   },
   {
    "slug": "pierre-frey",
@@ -121,7 +121,7 @@
   {
    "slug": "zuber-internal",
    "label": "Zuber — internal curation viewer",
-   "note": "dw-vendor-microsites zuber internal viewer; Kamatera pm2 zuber-internal on :10106"
+   "note": "dw-vendor-microsites zuber internal viewer; Kamatera pm2 zuber-internal on :10105"
   }
  ]
 }
\ No newline at end of file
diff --git a/scripts/crawl-microsites.js b/scripts/crawl-microsites.js
index 6fc30f1..88f62dd 100644
--- a/scripts/crawl-microsites.js
+++ b/scripts/crawl-microsites.js
@@ -171,9 +171,17 @@ function mergeSeeds(reg, db, cf) {
 const MICROSITE_AUTH = process.env.MICROSITE_BASIC_AUTH
   ? 'Basic ' + Buffer.from(process.env.MICROSITE_BASIC_AUTH).toString('base64')
   : null;
+// Only attach the internal cred to OUR OWN surfaces — localhost co-located viewers
+// and *.designerwallcoverings.com — never broadcast it to a third-party host.
+function isInternalHost(url) {
+  try {
+    const h = new URL(url).hostname;
+    return h === '127.0.0.1' || h === 'localhost' || /(^|\.)designerwallcoverings\.com$/i.test(h);
+  } catch { return false; }
+}
 async function getText(url, ms) {
   const headers = { 'user-agent': 'all-dw-crawler/1.0 (+all.designerwallcoverings.com)' };
-  if (MICROSITE_AUTH) headers.Authorization = MICROSITE_AUTH;
+  if (MICROSITE_AUTH && isInternalHost(url)) headers.Authorization = MICROSITE_AUTH;
   const r = await fetch(url, { redirect: 'follow', signal: AbortSignal.timeout(ms), headers });
   return { status: r.status, ok: r.ok, finalUrl: r.url, body: await r.text() };
 }

← 26c1985 Crawler: derive membership handle + title from mfr_sku/patte  ·  back to All Designerwallcoverings  ·  all.dw: vendor facet sorts alphabetically by name on load (w ce9854c →