Skip to content

feat(gateway): x402 crawl gateway for training crawlers - #127

Merged
ralyodio merged 1 commit into
mainfrom
feat/crawl-gateway
Oct 21, 2026
Merged

ralyodio merged 1 commit into
mainfrom
feat/crawl-gateway

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Wires @profullstack/x402-gateway 0.11 into the public gateway service (services/gateway), before routing and maintenance mode.

  • GPTBot and other training crawlers: 402 with PAYMENT-REQUIRED
  • /crawl: $1/day pass offer (USDC on Base/Polygon/Ethereum) plus the CoinPay "Buy a day pass" checkout
  • Browsers, verified Googlebot, AI chat fetchers: unchanged
  • Open: /health/*, /api/v1 (game clients, CoinPay webhooks, matchmaking), /_next/, robots, sitemap
  • Signed-in players (nc7_session cookie) are exempt
  • Off unless COINPAY_X402_KEY and CRAWL_PAY_TO are set (already in dev2 app.env)

Test: services/gateway/src/crawl.test.ts drives the real gateway server against a stub upstream.

🤖 Generated with Claude Code

Training crawlers get a 402 with PAYMENT-REQUIRED and /crawl sells a $1 day
pass (x402 USDC or CoinPay checkout). Browsers, verified search crawlers and
AI chat fetchers pass through. Health checks, /api/v1 and static assets stay
open. Off unless COINPAY_X402_KEY and CRAWL_PAY_TO are set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​x402-gateway@​0.11.08810010096100

View full report

@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

1 finding(s)

MEDIUM: 1

Severity Rule Location
MEDIUM js-unescaped-html-sink apps/site/app/_components/pit-footer.tsx:17

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit ad6c4f4 into main Oct 21, 2026
7 checks passed
@ralyodio
ralyodio deleted the feat/crawl-gateway branch October 21, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant