Persist one browser user agent for Axios and WebSockets

This commit is contained in:
Brandon Li
2026-10-19 06:08:23 -05:00
parent 13e03c3d0f
commit ed56e306d1
21 changed files with 380 additions and 64 deletions
+4 -3
View File
@@ -11,6 +11,7 @@ import { resolveContracts } from './contract-resolver';
import { startReporter, sendReport } from './reporter';
import { startBackupSync } from './backup-sync';
import { applyBrokerHttpDefaults, applyBrokerProxy } from './outbound-proxy';
import axios from './http-client';
import { startMasterLink } from './master-link';
import { startUpdaterWatchdog } from './updater-watchdog';
import { resumeSchedulerIfPersisted } from './auto-trade';
@@ -185,10 +186,10 @@ export function getClients(): Map<string, PlatformClient> {
try {
// Before anything dials out: a timeout on every broker HTTP call,
// and the operator's proxy (if any) under the broker clients.
// Master traffic stays direct by design. (outbound-proxy applies
// Master traffic stays direct by design. (http-client applies
// both when it loads, too; these are idempotent.)
applyBrokerHttpDefaults();
applyBrokerProxy();
applyBrokerHttpDefaults(axios.defaults);
applyBrokerProxy(axios.defaults);
// Pull the catalog before anything else — without it there are no
// firms to start clients for. Subsequent changes re-reconcile and