fix(server): serve /integrations/ hub explicitly so the nav link isn't the login page
Some checks are pending
CI / Unit tests (node --test) (push) Waiting to run
CI / OpenAPI spec lint (push) Waiting to run
CI / Android unit tests (Kotlin schedule evaluator vectors) (push) Waiting to run
CI / Boot smoke + version check (push) Waiting to run

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 <noreply@anthropic.com>
This commit is contained in:
ScreenTinker 2026-07-13 12:27:38 -05:00
parent 3c59f647ac
commit 406872c439

View file

@ -237,6 +237,14 @@ app.get('/agency', (req, res) => {
res.sendFile(path.join(config.frontendDir, 'agency.html')); 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 // Serve frontend static files
// JS/CSS/HTML: no-cache (always revalidate, uses ETag/304) // JS/CSS/HTML: no-cache (always revalidate, uses ETag/304)
// Images/fonts/icons: long cache for Cloudflare + browser // Images/fonts/icons: long cache for Cloudflare + browser