From 406872c439190092ad4c53dcb1ead6f54358f729 Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Mon, 13 Jul 2026 12:27:38 -0500 Subject: [PATCH] fix(server): serve /integrations/ hub explicitly so the nav link isn't the login page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit express.static runs with index:false, so a bare /integrations/ fell through to the SPA catch-all and rendered the dashboard login instead of the integrations hub — the top-nav "Integrations" link, the canonical, and the sitemap entry all dead-ended at login. Add an explicit route (like /agency, /sitemap.xml): /integrations/ -> the hub's index.html, and /integrations -> 301 /integrations/. Spoke pages are real .html files already served by static. Folded into a re-cut of v1.9.6. Co-Authored-By: Claude Opus 4.8 --- server/server.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/server.js b/server/server.js index 719b920..32c5062 100644 --- a/server/server.js +++ b/server/server.js @@ -237,6 +237,14 @@ app.get('/agency', (req, res) => { res.sendFile(path.join(config.frontendDir, 'agency.html')); }); +// The integrations hub is a directory index. express.static below runs with index:false, +// so a bare /integrations/ would otherwise fall through to the SPA catch-all (login page). +// Serve it explicitly (the spoke pages are real .html files and static already handles them). +app.get(['/integrations', '/integrations/'], (req, res) => { + if (req.path === '/integrations') return res.redirect(301, '/integrations/'); + res.sendFile(path.join(config.frontendDir, 'integrations', 'index.html')); +}); + // Serve frontend static files // JS/CSS/HTML: no-cache (always revalidate, uses ETag/304) // Images/fonts/icons: long cache for Cloudflare + browser