Repository navigation
0.15.0: never charge sign-in, account, checkout or webhook paths - #24
Merged
Merged
Conversation
Since 0.8 a stale or headless browser string is charged on every path, including /login, /signup, /oauth, /dashboard, /pay and /api/*. Every fleet site on ^0.13.1 answered an old Chrome or HeadlessChrome with 402 there, so an agent whose CoinPay OAuth token lapsed could not sign back in. APP_PATHS (exported, with isAppPath) lists those surfaces; handle() lets them through after `exempt`. Sites append their own with `appPaths`, or pass false. Also ports test/verify-badge.test.js from vitest (not a dependency) to node:test, which had main's CI red since #23. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since 0.8.0 (
chargeStaleBrowsers, headless list) a request with a Chrome string two years old, orHeadlessChrome, is charged on every path. That includes/login,/signup,/oauth/*,/dashboard,/pay/*,/api/healthand webhooks. Reproduced 2026-10-28 on coinpayportal.com, ugig.net, crawlproof.com, smshub.dev, saasrow.com, pit.world, nixamp.com, profullstack.com, bittorrented.com: aChrome/120UA gets 402 on/loginand/signup. An agent whose CoinPay OAuth token lapsed could not re-authenticate, so its listings became unpayable.Fix
APP_PATHS(exported, frozen) +isAppPath(path, paths): sign-in, account, checkout, pay, webhook and health paths, matched by whole segment (/paycovers/pay/x, not/payouts-explained).handle()returns null for them right afterexempt, before the crawler lists, challenge and free quota.appPathsoption appends site paths (e.g.'/api'for an app whose whole API is credentialed);falsedisables.test/verify-badge.test.jsimportedvitest, which is not a dependency, and has kept main's CI red since feat: add x402 verification badge endpoint for external indexers #23. Ported it tonode:test.Tests
node --test: 183 pass. Newtest/app-paths.test.jscovers stale Chrome, HeadlessChrome and GPTBot on app paths (null) and content (402), segment matching,appPathsextension andfalse.🤖 Generated with Claude Code