driprunner.app is home: other hosts forward pages (path + query kept), API/callback/health/badges answer everywhere; preview images on the new domain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<meta name="description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL in your wallet.">
|
<meta name="description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL in your wallet.">
|
||||||
<meta property="og:title" content="Drip Runner: hop the network, get paid in POL">
|
<meta property="og:title" content="Drip Runner: hop the network, get paid in POL">
|
||||||
<meta property="og:description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL.">
|
<meta property="og:description" content="A fast runner game for InstantAdPay members. Clear chapters, refuel on member pages, collect POL.">
|
||||||
<meta property="og:image" content="https://driprunner.saasy.top/badges/ch5.jpg">
|
<meta property="og:image" content="https://driprunner.app/badges/ch5.jpg">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
|
||||||
<link rel="stylesheet" href="/site.css">
|
<link rel="stylesheet" href="/site.css">
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
<title>Drip Runner</title>
|
<title>Drip Runner</title>
|
||||||
<meta property="og:title" content="Drip Runner: hop the network, get paid in POL">
|
<meta property="og:title" content="Drip Runner: hop the network, get paid in POL">
|
||||||
<meta property="og:description" content="A fast little runner game for InstantAdPay members. Clear chapters, refuel on sponsor pages, collect POL.">
|
<meta property="og:description" content="A fast little runner game for InstantAdPay members. Clear chapters, refuel on sponsor pages, collect POL.">
|
||||||
<meta property="og:image" content="https://driprunner.saasy.top/badges/ch1.jpg">
|
<meta property="og:image" content="https://driprunner.app/badges/ch1.jpg">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800;900&family=Manrope:wght@400;600;800&family=JetBrains+Mono:wght@500;700&display=swap">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -159,6 +159,12 @@ async function creditRefuel(intent, nonce, info) {
|
|||||||
// ---- server ------------------------------------------------------------------------------------
|
// ---- server ------------------------------------------------------------------------------------
|
||||||
const server = http.createServer(async (req, res) => {
|
const server = http.createServer(async (req, res) => {
|
||||||
const u = new URL(req.url, 'http://x'); const p = u.pathname;
|
const u = new URL(req.url, 'http://x'); const p = u.pathname;
|
||||||
|
// one home address (2026-10-01): pages on any other host we answer for (driprunner.saasy.top, www.) move to SITE_URL with the
|
||||||
|
// path and query intact, so key links keep working and a refuel never returns to a different origin than the run started on.
|
||||||
|
// The API, the IAP callback, health and the badge art answer on every host.
|
||||||
|
{ const host = String(req.headers.host || '').toLowerCase().split(':')[0]; const home = SITE.replace(/^https?:\/\//, '').toLowerCase();
|
||||||
|
if (IS_PROD && host && host !== home && req.method === 'GET' && !p.startsWith('/api/') && p !== '/health' && !p.startsWith('/badges/')) {
|
||||||
|
res.writeHead(301, { Location: SITE + req.url, 'Cache-Control': 'no-store' }); return res.end(); } }
|
||||||
try {
|
try {
|
||||||
if (p === '/health') return json(res, 200, { ok: true, outbound: outbound(), curtain: !!CURTAIN, sso: sso.enabled(), faucet: faucetOn, dryRun: faucet.dry(), chain: Number(process.env.DR_CHAIN_ID) || null, signups: String(process.env.DR_SIGNUPS || ledger.settings().signups) });
|
if (p === '/health') return json(res, 200, { ok: true, outbound: outbound(), curtain: !!CURTAIN, sso: sso.enabled(), faucet: faucetOn, dryRun: faucet.dry(), chain: Number(process.env.DR_CHAIN_ID) || null, signups: String(process.env.DR_SIGNUPS || ledger.settings().signups) });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user