This commit is contained in:
ZOMBIIIIIII
2026-05-14 15:20:00 +03:00
parent e88ee3a55f
commit 11ee5a2c7f
7 changed files with 248 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ import { logger } from '../lib/logger';
import { WalletModel } from '../models/wallet.model';
import type { ChainCode } from '../lib/address-validators';
import { indexRelayExecuteResponse } from '../lib/relay-trusted-cache';
import { proxiedFetch } from '../lib/outbound-proxy';
const router = Router();
const RELAY_API_URL = 'https://api.relay.link';
@@ -131,7 +132,9 @@ async function proxyRelayRequest(req: Request, res: Response, next: NextFunction
let upstream: globalThis.Response;
try {
upstream = await fetch(relayUrl.toString(), {
// Через OUTBOUND_PROXY_URL если задан (bridge path) — Relay calls идут через proxy.
// Fallback на native fetch если env пустой.
upstream = await proxiedFetch(relayUrl.toString(), {
method: req.method,
headers: {
Accept: 'application/json',