/my redirector as an external script (CSP allows no inline scripts)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-08 15:40:10 -05:00
parent 8ec82bd282
commit ef06cd4baa
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -3043,7 +3043,7 @@ const server = http.createServer(async (req, res) => {
if (p === '/tools') return sendFile(res, path.join(PUBLIC_DIR, 'my.html')); // classic panes the control room lacks (More)
if (p === '/my') { // retired 2026-10-08: old links/emails/bookmarks land on the right control-room screen by #pane
res.writeHead(200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }));
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><meta name="robots" content="noindex"></head><body><script>var M={"": "/links", "overview": "/tools", "line": "/team", "pipeline": "/tools#pipeline", "buy": "/credits", "rotator": "/links", "campaigns": "/ads", "earn": "/ads", "earnings": "/credits", "promo": "/tools#promo", "training": "/tools#training", "wallet": "/wallet", "profile": "/tools#profile"};var h=(location.hash||\'\').slice(1);location.replace(M[h]||(\'/tools#\'+h))</script><noscript><a href="/links">Open the control room</a></noscript></body></html>');
return res.end('<!doctype html><html><head><meta charset="utf-8"><title>LinkSpin</title><meta name="robots" content="noindex"></head><body><script src="/assets/my-redirect.js?v=20261008a"></script><noscript><a href="/links">Open the control room</a></noscript></body></html>');
}
if (p === '/links') return sendFile(res, path.join(PUBLIC_DIR, 'links.html')); // Control Room: the links workspace, first screen of the new front end (2026-09-29)
if (p === '/reports') return sendFile(res, path.join(PUBLIC_DIR, 'reports.html'));