[object Object]

← back to Glassbeadedwallpaper

vendor-redact: scrub DW vendor names from /api/products (raw-http server uses redact() inline; was leaking)

732dc8a0af085b179b59552496606942e317ba27 · 2026-06-01 16:18:32 -0700 · Steve

Files touched

Diff

commit 732dc8a0af085b179b59552496606942e317ba27
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Jun 1 16:18:32 2026 -0700

    vendor-redact: scrub DW vendor names from /api/products (raw-http server uses redact() inline; was leaking)
---
 server.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index e5e8d5a..20df799 100644
--- a/server.js
+++ b/server.js
@@ -3,6 +3,7 @@ const fs = require('fs');
 const path = require('path');
 require('dotenv').config({ path: '/root/DW-Agents/claudette-agent/.env' });
 const { Pool } = require('pg');
+const { redact } = require('../_shared/api-vendor-redact'); // scrub DW vendor names from /api responses (standing rule; raw-http server, so applied by hand)
 
 const PORT = process.env.PORT || 3012;
 const pool = new Pool({ connectionString: process.env.DB_URL || process.env.DATABASE_URL });
@@ -79,7 +80,7 @@ const server = http.createServer((req, res) => {
         getProducts()
             .then(rows => {
                 res.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store, must-revalidate' });
-                res.end(JSON.stringify(rows));
+                res.end(JSON.stringify(redact(rows)));
             })
             .catch(err => {
                 console.error('/api/products error:', err.message);

← 51d9d40 fix(hero): replace 404 glass-bead-hero.jpg + glass-bead-logo  ·  back to Glassbeadedwallpaper  ·  code-health: untrack 1.4MB backup json + 404-guard backup/sc 450412b →