diff --git a/server.js b/server.js index b3c518b..a267896 100644 --- a/server.js +++ b/server.js @@ -2568,7 +2568,10 @@ const server = http.createServer(async (req, res) => { const rc = gkMint({ kind: 'gk-receipt', order: c.order, email: String(c.email).toLowerCase(), crowns: Number(c.crowns), credits: Number(c.credits), ref: out.campaignId }, 24 * 3600000); gkCallback(c.cb, rc); // the server copy; the redirect below is the fast path const ret = String(c.ret || '').startsWith(GK_URL() + '/') ? c.ret : GK_URL() + '/api/iap/receipt'; - res.writeHead(302, { Location: ret + '?t=' + rc, 'Cache-Control': 'no-store', 'Set-Cookie': gkCookie('iap.gkshop', '', 0) }); return res.end(); + // a 200 page, not a 302: CSP form-action 'self' blocks a form POST from redirecting to another site (the page just sat there) + const back = gkEsc(ret + '?t=' + rc); + res.setHeader('Set-Cookie', gkCookie('iap.gkshop', '', 0)); + return gkPage(res, 200, 'Crowns added', '

Gem Kingdom ยท Crown Shop

Paid!

+' + Number(c.crowns).toLocaleString('en-US') + ' Crowns

Taking you back to your kingdom...

Back to Gem Kingdom'); } // -- PassiveDrip card on the Earn tab (Marty, 2026-10-01: "It's an earning site", not a game). Members see it when // site config passivedripLive is 'on'; until then only the admin sees it, marked preview.