[object Object]

← back to Contractwallpaper

wire api-vendor-redact middleware (close vendors-facet leak)

00ce39ff8b72d435195f3bc2bb8ab1d651b827a8 · 2026-05-26 07:19:42 -0700 · Steve

Files touched

Diff

commit 00ce39ff8b72d435195f3bc2bb8ab1d651b827a8
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue May 26 07:19:42 2026 -0700

    wire api-vendor-redact middleware (close vendors-facet leak)
---
 server.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/server.js b/server.js
index c5363c5..72d924a 100644
--- a/server.js
+++ b/server.js
@@ -139,6 +139,10 @@ function sortProducts(list, mode) {
 
 app.use(helmet({ contentSecurityPolicy: false }));
 app.use(express.json({ limit: '256kb' }));
+
+// Fleet-wide DW vendor-name redactor on /api/* (drops `vendors` facet, replaces
+// any `vendor` field with "Designer Wallcoverings", strips `?vendor=` query).
+app.use(require('../_shared/api-vendor-redact'));
 // Universal contact module — modals, /api/send-inquiry, /api/send-sample, /zd-loader.js
 require('./_universal-contact')(app, { siteName: "Contract Wallpaper", zdColor: "#7ea8d4", zdPosition: 'right' });
 require('./_universal-auth')(app, { siteName: "contractwallpaper" });

← eca0bc3 add: clean-URL routes for /care /history /sourcing /trade /v  ·  back to Contractwallpaper  ·  site.config rails: align with actual product aesthetics 3e62562 →