mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-13 13:53:12 -06:00
fix(server): serve /integrations/ hub explicitly so the nav link isn't the login page
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:
parent
3c59f647ac
commit
406872c439
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue