remoteSource
Function: remoteSource()
Section titled “Function: remoteSource()”remoteSource(
options):ConfigSource
Defined in: sources.ts:113
A source that fetches a JSON object of config values from an HTTP endpoint.
The endpoint must return a flat Record<string, string>. Nested objects
and arrays are not supported - flatten on the server before sending, or
use a more capable secret manager and write a custom source.
Failures are soft: a network error returns an empty object so the loader can fall back to other sources. Validate via the schema if a remote value is required.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Example
Section titled “Example”remoteSource({ url: "https://config.internal/app", headers: { authorization: `Bearer ${token}` },})