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:
@@ -4,7 +4,7 @@
|
||||
(function () {
|
||||
var esc = function (s) { return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) { return ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]; }); };
|
||||
var ref = ''; try { ref = new URLSearchParams(location.search).get('ref') || ''; } catch (e) {}
|
||||
if (ref) { var j = document.getElementById('gJoin'); if (j) j.href = '/join?ref=' + encodeURIComponent(ref); }
|
||||
if (ref) { var j = document.getElementById('gJoin'); if (j) j.href = '/join/' + encodeURIComponent(ref); } // the sponsored join page itself (bare /join used to 404, Diann 2026-10-11)
|
||||
function card(g) {
|
||||
var soon = !g.live && g.opens;
|
||||
var ribbon = g.season ? '<span class="ribbon">Limited time · ends ' + esc(g.season.ends) + '</span>' : soon ? '<span class="ribbon soon">' + esc(g.opens) + '</span>' : '';
|
||||
|
||||
+1
-1
@@ -78,6 +78,6 @@
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261007a"></script><script src="/assets/games-page.js?v=20261010c"></script>
|
||||
<script src="/assets/common.js?v=20261007a"></script><script src="/assets/games-page.js?v=20261011a"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -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