[object Object]

← back to All Designerwallcoverings

Fix crezana internalViewer port 10104->10106; vendor-name fallback for gated 401 directory titles

22ee077a1efebfc25b18613202f9e643b08fffdc · 2026-07-14 08:11:32 -0700 · Steve Abrams

Files touched

Diff

commit 22ee077a1efebfc25b18613202f9e643b08fffdc
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jul 14 08:11:32 2026 -0700

    Fix crezana internalViewer port 10104->10106; vendor-name fallback for gated 401 directory titles
---
 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 23ec431..9bff674 100644
--- a/config/known-subdomains.json
+++ b/config/known-subdomains.json
@@ -78,7 +78,7 @@
    "knownProject": "~/Projects/dw-vendor-microsites/vendors/crezana",
    "note": "ONBOARDING/STAGING 2026-07-09 — Crezana Design textile/fabric line (product_type Fabric). 443 gallery images in crezana_catalog (feed-first GoDaddy gpub bundles, $0). NOTE: source is an editorial GoDaddy gallery with NO SKUs/prices/specs — synthetic names, QUOTE-ONLY; real activation BLOCKED on a Crezana line sheet. Shopify DRAFT import + microsite deploy + DNS gated.",
    "hasMicrosite": true,
-   "internalViewer": "http://127.0.0.1:10104 (~/Projects/crezana-internal, pm2 crezana-internal)"
+   "internalViewer": "http://127.0.0.1:10106 (~/Projects/crezana-internal, pm2 crezana-internal)"
   }
  ],
  "internal": [
@@ -111,7 +111,7 @@
   {
    "slug": "crezana-internal",
    "label": "Crezana Design — internal curation viewer",
-   "note": "dw-vendor-microsites crezana internal viewer; Kamatera pm2 crezana-internal on :10104"
+   "note": "dw-vendor-microsites crezana internal viewer; Kamatera pm2 crezana-internal on :10106"
   },
   {
    "slug": "gracie-internal",
diff --git a/scripts/crawl-microsites.js b/scripts/crawl-microsites.js
index 4f67b92..cb39aea 100644
--- a/scripts/crawl-microsites.js
+++ b/scripts/crawl-microsites.js
@@ -290,7 +290,13 @@ async function crawlOne(seed) {
     rec.status = root.status; rec.finalUrl = root.finalUrl;
     // 401 = healthy-but-gated (Steve's convention); still "up".
     rec.up = root.ok || root.status === 401;
-    if (root.body) { rec.title = metaTitle(root.body) || rec.title; rec.hero = ogImage(root.body) || rec.hero; }
+    if (root.body) {
+      // A gated/undeployed public host returns a 401/403 page — don't let its
+      // "401 Authorization Required" <title> become the directory card label.
+      const t = metaTitle(root.body);
+      if (t && !/^\s*(401|403)\b|authorization required|forbidden|access denied/i.test(t)) rec.title = t;
+      rec.hero = ogImage(root.body) || rec.hero;
+    }
   } catch (e) { rec.error = e.name === 'TimeoutError' ? 'timeout' : e.message; }
 
   // A co-located microsite (feedBase = localhost) is readable even if its PUBLIC host
@@ -308,6 +314,8 @@ async function crawlOne(seed) {
       if (!rec.hero && rec.products[0]) rec.hero = rec.products[0].image;
     }
   }
+  // Fall back to the vendor name when no usable page <title> was found (gated/undeployed sites).
+  if (!rec.title) rec.title = clean(seed.vendor) || seed.slug;
   return rec;
 }
 

← f5cefcb chore: v1.4.0 — similar-pattern search feature (session clos  ·  back to All Designerwallcoverings  ·  Crawler: derive membership handle + title from mfr_sku/patte 26c1985 →