From 836d19b1bab8a1ac366a167143d4ee1cc5d93d3d Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 22 Oct 2026 21:46:36 +0000 Subject: [PATCH] x402-gateway 0.13.0: require the challenge stylesheet cookie (challenge.css) The headless-Chrome swarm solves the 17-bit PoW but never loads CSS (11 of 5,394 addresses fetched any CSS/JS), so the cookie now also needs a fetch of a per-address stylesheet. Co-Authored-By: Claude Opus 5.5 --- apps/web/package.json | 2 +- apps/web/src/lib/pricing.js | 6 ++++++ bun.lock | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 549e4c0..80c0f8f 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -28,7 +28,7 @@ "@profullstack/openprofile": "^0.2.0", "@profullstack/partners": "0.2.0", "@profullstack/throttle": "^0.3.3", - "@profullstack/x402-gateway": "0.12.0", + "@profullstack/x402-gateway": "0.13.0", "@simplewebauthn/browser": "^13.2.0", "hono": "^4.10.3" } diff --git a/apps/web/src/lib/pricing.js b/apps/web/src/lib/pricing.js index 76f59ab..a9466a6 100644 --- a/apps/web/src/lib/pricing.js +++ b/apps/web/src/lib/pricing.js @@ -153,8 +153,14 @@ export function gatewayOptions(priceCents) { * ~0.5 s on a desktop once a day for a person, the same on EVERY page for * a swarm that changes address each page. */ + /* + * The PoW did not slow it (its Chrome solves 17 bits), but it never loads + * a stylesheet: 11 of 5,394 swarm addresses fetched any CSS or JS. `css` + * makes a per-address stylesheet fetch set the second cookie. + */ challenge: { work: 17, + css: true, paths: ['/i/', '/feeds/', '/tlds', '/tlds/'], when: (_request, url) => url.pathname.startsWith('/i/') || url.search.length > 1, }, diff --git a/bun.lock b/bun.lock index 302f6eb..4977ac1 100644 --- a/bun.lock +++ b/bun.lock @@ -41,7 +41,7 @@ "@profullstack/openprofile": "^0.2.0", "@profullstack/partners": "0.2.0", "@profullstack/throttle": "^0.3.3", - "@profullstack/x402-gateway": "0.12.0", + "@profullstack/x402-gateway": "0.13.0", "@simplewebauthn/browser": "^13.2.0", "hono": "^4.10.3", }, @@ -351,7 +351,7 @@ "@profullstack/throttle": ["@profullstack/throttle@0.3.3", "", { "dependencies": { "@profullstack/x402-gateway": "^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0" } }, "sha512-GigeMGXS/1T2UseW0gYvFbxgMuo89/bhW92xMPv/IKAR860mhCdo2G8U4Schciw27seDXVGNErWpTSUC2zGoiA=="], - "@profullstack/x402-gateway": ["@profullstack/x402-gateway@0.12.0", "", { "dependencies": { "@profullstack/keys": "^0.1.0" } }, "sha512-14rsLsJH/0eSebZ+GxRkWqdFV4t8i/7EsG/vfwcBRRv5Gpq8Nbepkbqc0z/wIeyUqhO1K+0z45N7y1TmnVDFSg=="], + "@profullstack/x402-gateway": ["@profullstack/x402-gateway@0.13.0", "", { "dependencies": { "@profullstack/keys": "^0.1.0" } }, "sha512-6HLUbOQdVUSXkeNXvaaniG+5yF+npwhYGA4U7l91Ds05BsBZKOdGWMy7CeSyU4hgDMnXxsVOrAESfNmfvvEj1A=="], "@redis/bloom": ["@redis/bloom@1.2.0", "", { "peerDependencies": { "@redis/client": "^1.0.0" } }, "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg=="],