ResolveRayfinConfigOptions interface
Options controlling how resolveRayfinConfig fetches remote runtime configuration. To skip remote loading entirely, don't call it — construct the client directly from your own values instead.
Properties
| config |
Absolute URL to fetch the runtime config from, overriding the default
relative The default relative path only resolves in a browser, where |
Property Details
configUrl
Absolute URL to fetch the runtime config from, overriding the default
relative /rayfin.config.json.
The default relative path only resolves in a browser, where fetch
implicitly uses the page's document origin. Non-browser runtimes (e.g.
a supplied-token client in Node.js) have no such origin, so omitting
configUrl there skips the fetch entirely and falls back to
caller-supplied values, rather than attempting a relative fetch that
would always reject. Pass an absolute configUrl (e.g.
${process.env.RAYFIN_API_URL}/rayfin.config.json) to enable remote
config loading outside the browser — once set (or in the browser, where
a fetch is always attempted), a fetch failure (unreachable host,
DNS/TLS error, offline, etc.) throws RayfinConfigError
(CONFIG_LOAD_FAILED) rather than silently falling back, since it's a
real failure, not evidence of absence.
configUrl?: string
Property Value
string