Skip to content

Send a descriptive User-Agent to CoinPay - #363

Merged
ralyodio merged 1 commit into
masterfrom
riotcoder/coinpay-user-agent
Nov 22, 2026
Merged

ralyodio merged 1 commit into
masterfrom
riotcoder/coinpay-user-agent

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

All fleet apps share one public IP on dev2, so CoinPay saw this app only as node / Next.js Middleware. Now every server-side CoinPay call sends qrypt.chat/<version> (+https://qrypt.chat) through one UA-adding fetch (src/lib/server/coinpay-ua.js, no Node-only imports):

  • Phone-credit checkout sessions (createCheckoutSession already takes fetchImpl).
  • Sign in with CoinPay: finishSignIn (coinpay-onboard 0.3.1, no userAgent option) gets the fetch for token + userinfo.
  • Crawl gateway: x402-gateway stays on ^0.16.1 (0.18 changes bot charging); its fetch option gets the wrapper for x402 verify/settle and checkout.

Changed files transpile with bun; no local node_modules for vitest.

🤖 Generated with Claude Code

All fleet apps share one public IP on dev2, so CoinPay saw this app only as `node` / `Next.js Middleware`. Now every server-side CoinPay call sends `qrypt.chat/<version> (+https://qrypt.chat)` through one UA-adding fetch (`src/lib/server/coinpay-ua.js`, no Node-only imports):

- Phone-credit checkout sessions (`createCheckoutSession` already takes `fetchImpl`).
- Sign in with CoinPay: `finishSignIn` (coinpay-onboard 0.3.1, no userAgent option) gets the fetch for token + userinfo.
- Crawl gateway: x402-gateway stays on ^0.16.1 (0.18 changes bot charging); its `fetch` option gets the wrapper for x402 verify/settle and checkout.

Changed files transpile with bun; no local node_modules for vitest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

19 finding(s)

MEDIUM: 15 | LOW: 4

Severity Rule Location
MEDIUM gha-ssh-key-secret .github/workflows/deploy-dev2.yml:39
MEDIUM js-unescaped-html-sink src/app/blog/[slug]/page.jsx:38
MEDIUM js-unescaped-html-sink src/app/blog/[slug]/page.jsx:66
MEDIUM js-unescaped-html-sink src/app/faq/page.jsx:57
MEDIUM js-unescaped-html-sink src/app/layout.jsx:142
MEDIUM js-unescaped-html-sink src/app/layout.jsx:146
MEDIUM js-unescaped-html-sink src/app/page.jsx:50
MEDIUM js-open-redirect src/app/phone/page.jsx:70
MEDIUM redos-nested-quantifier src/lib/auth/dns-name.js:88
MEDIUM redos-nested-quantifier src/lib/chat/voice-mode.js:116
MEDIUM redos-nested-quantifier src/lib/chat/voice-mode.js:121
MEDIUM js-unescaped-html-sink src/lib/components/chat/MessageItem.jsx:85
MEDIUM js-unescaped-html-sink src/lib/components/chat/MessageItem.jsx:130
MEDIUM js-unescaped-html-sink src/lib/components/PitFooter.jsx:15
MEDIUM js-open-redirect src/lib/components/settings/CoinpaySettings.jsx:62
LOW secret-generic-credential src/app/api/auth/register-anon/route.test.js:32
LOW secret-supabase-service-role tests/debug-sms.js:10
LOW secret-generic-credential tests/private-key-import-export.test.js:252
LOW secret-generic-credential tests/private-key-import-export.test.js:264

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit d188d54 into master Nov 22, 2026
6 checks passed
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