[object Object]

← back to Rentv 2026

PR intel (a): also delegate the no-trailing-slash /admin/pr-intelligence index so the empty shell isn't anon-accessible (data was already 401 either way)

f6e1cf9db884548d58efb1ea7a5a8cc09f1dc35e · 2026-08-06 09:41:55 -0700 · Steve

Files touched

Diff

commit f6e1cf9db884548d58efb1ea7a5a8cc09f1dc35e
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Aug 6 09:41:55 2026 -0700

    PR intel (a): also delegate the no-trailing-slash /admin/pr-intelligence index so the empty shell isn't anon-accessible (data was already 401 either way)
---
 server.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 75979425..5c9b49ca 100644
--- a/server.js
+++ b/server.js
@@ -108,7 +108,7 @@ app.use((req, res, next) => {
   // src/pr/index.js — every /api/pr route 401/403s by role). Delegate its surface to that layer so
   // CRM clients sign in with only their own credentials, but STILL resolve Basic/service creds here
   // so every existing loopback tool (enrichment, openclaw, crawl) keeps working unchanged.
-  if (req.path.startsWith('/api/pr/') || req.path.startsWith('/admin/pr-intelligence/')) {
+  if (req.path.startsWith('/api/pr/') || req.path === '/admin/pr-intelligence' || req.path.startsWith('/admin/pr-intelligence/')) {
     const az = req.headers.authorization || '';
     const r = CRED_ROLE.get(az);
     if (r) { req.role = r; req.authVia = 'basic'; }

← 88858d33 Public polish: hide all admin nav links from public + SEO fo  ·  back to Rentv 2026  ·  PR intel (b2 partial): scope outreach reads by tenant + comp 108b7392 →