mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-11-29 15:51:52 +00:00
logicsrc.com (Next), app.logicsrc.com (pwa) and the rotation CLI now send a descriptive User-Agent on every server-side CoinPay request, so CoinPay's logs and throttle can tell them apart from the other apps on dev2: - logicsrc.com: logicsrc.com/<version> (+https://logicsrc.com) on merchant eligibility, checkout sessions, OAuth token and userinfo; x402-gateway ^0.18.2 names the site on crawl-gateway calls. - app.logicsrc.com: app.logicsrc.com/<version> on the CoinPay OAuth calls and, through coinpay-onboard 0.3.1's fetch hook, on the auto-rotation client. - logicsrc CLI rotators: logicsrc-cli/<version> (+https://logicsrc.com). Co-authored-by: riotcoder <riotcoder@profullstack.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
432 B
JavaScript
10 lines
432 B
JavaScript
import { readFileSync } from "node:fs";
|
|
|
|
// Sent on every server-side call to CoinPay so its logs and throttle can tell
|
|
// app.logicsrc.com apart from the other apps on the same box.
|
|
let version = "";
|
|
try {
|
|
version = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8")).version || "";
|
|
} catch {}
|
|
|
|
export const COINPAY_UA = `app.logicsrc.com${version ? `/${version}` : ""} (+https://app.logicsrc.com)`;
|