Bare /join redirects to the sponsored join page (cookie sponsor, else company); games page links /join/<ref> directly
Diann: "Join free" on /games?ref=diannt landed on "Not found". /join, /join?ref= and the Friday/Wednesday /join?v= links all 404ed because only /join/<token> was routed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1744,6 +1744,14 @@ const server = http.createServer(async (req, res) => {
|
||||
// never changes an existing account's sponsor; the contract binds the buyer at
|
||||
// their first purchase). Codes resolve LATE (at buy time) to whatever chain id
|
||||
// the referrer has by then, so free members refer from day one.
|
||||
// Bare /join (Diann 2026-10-11: the games page's "Join free" and the Friday/Wednesday pages linked to /join and got
|
||||
// "Not found"): send the visitor to the sponsored join page. ?ref= has already been folded into the iap.sponsor cookie by
|
||||
// the viral-link handler above, so the cookie decides; nobody known -> the company position, like the partner kit.
|
||||
if ((p === '/join' || p === '/join/') && (req.method === 'GET' || req.method === 'HEAD')) {
|
||||
const spon = String(parseCookies(req)['iap.sponsor'] || '').toLowerCase().replace(/[^a-z0-9_]/g, '').slice(0, 20);
|
||||
u.searchParams.delete('ref'); const qs = u.searchParams.toString();
|
||||
res.writeHead(302, baseHeaders({ Location: '/join/' + (spon || 'company') + (qs ? '?' + qs : ''), 'Cache-Control': 'no-store' })); return res.end();
|
||||
}
|
||||
let m = /^\/join\/([A-Za-z0-9_]{1,20})$/.exec(p);
|
||||
if (m && (req.method === 'GET' || req.method === 'HEAD')) {
|
||||
// lead-capture page: email first, wallet later. ?v=<angle> picks the hook
|
||||
|
||||
Reference in New Issue
Block a user