← back to Flockedwallpaper
vendor-redact: scrub DW vendor names from /api/products (raw-http server uses redact() inline; was leaking)
6367d695b03606fbbc06a98b1c57f9c8124173f8 · 2026-06-01 16:18:32 -0700 · Steve
Files touched
Diff
commit 6367d695b03606fbbc06a98b1c57f9c8124173f8
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 4857e91..ae461c8 100644
--- a/server.js
+++ b/server.js
@@ -3,6 +3,7 @@ const fs = require('fs');
const path = require('path');
require('dotenv').config({ path: process.env.DOTENV_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 || 3200;
const pool = new Pool({ connectionString: process.env.DB_URL || process.env.DATABASE_URL });
@@ -56,7 +57,7 @@ const server = http.createServer((req, res) => {
getProducts()
.then(rows => {
res.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'public, max-age=60' });
- res.end(JSON.stringify(rows));
+ res.end(JSON.stringify(redact(rows)));
})
.catch(err => {
console.error('/api/products error:', err.message);
← b397162 remove publicly-served backup files and tighten .gitignore t
·
back to Flockedwallpaper
·
seo: add canonical + Open Graph + Twitter card + meta descri 459b4e6 →