Function: buildForwardedIpHeaders()
buildForwardedIpHeaders(
options):Promise<Record<string,string> |null>
One-shot forwarded-IP header builder from a secret STRING — for server-side
transports that sign per request WITHOUT the client middleware pipeline (e.g. the
BFF auth route's server-to-server fetch). Returns null when any signing input is
missing, so the caller forwards nothing and the backend keys the connection IP (the
server-side default). Imports the HMAC key per call — fine for low-frequency auth
calls; the middleware caches the key for the hot GraphQL path. Server-side only —
the secret must never reach the browser.
Parameters
options
BuildForwardedIpHeadersOptions
Returns
Promise<Record<string, string> | null>