From 77c287e953e502f9b003da2c6146fab02f13bec8 Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 28 Aug 2026 10:52:21 -0500 Subject: [PATCH] Route /p// through the API dispatcher The dispatcher only forwarded the bare /p/ shape, so Funnel Factory pages fell through to the static handler and 404'd instead of rendering (or falling back to the member's main page). Co-Authored-By: Claude Fable 5 --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index a3dda28..9b1f208 100644 --- a/server.js +++ b/server.js @@ -1263,7 +1263,7 @@ const server=http.createServer(async(req,res)=>{ const u=new URL(req.url,`http://${req.headers.host||'localhost'}`),pathname=decodeURIComponent(u.pathname); // /p/ = member Page Builder pages: dynamic HTML, so it must reach the // API handler rather than the static-file path (which 404s it). - if(pathname==='/health'||pathname.startsWith('/api/')||/^\/p\/\d{1,15}$/.test(pathname))return await handleApi(req,res,pathname); + if(pathname==='/health'||pathname.startsWith('/api/')||/^\/p\/\d{1,15}(\/[a-z0-9-]{1,24})?$/.test(pathname))return await handleApi(req,res,pathname); if(req.method!=='GET'&&req.method!=='HEAD')return send(res,405,'Method Not Allowed',{'Content-Type':'text/plain; charset=utf-8'}); // Members-area gate: the Circle Method lessons 2-10 + the e-gift cash-out // walkthrough are the PRODUCT — their video FILES require a wallet-verified