ElectricProxyOptions
Defined in: packages/server/src/electric-proxy.ts:21
Properties
Section titled “Properties”bustLiveUpstreamCache?
Section titled “bustLiveUpstreamCache?”
optionalbustLiveUpstreamCache?:boolean
Defined in: packages/server/src/electric-proxy.ts:49
Append a unique cache-buster to every live=true request forwarded upstream (default ON; set
false to restore upstream CDN collapse of live long-polls). Stopgap for Electric Cloud serving
live long-polls from a layer blind to fresh commits: consecutive full-hold (~41s) up-to-date
responses at an unmoved offset despite an advancing cursor, measured cross-client propagation
of 40–89s (backlog 0001, 2026-07-04; upstream report alongside it). Only the live tail is busted —
catch-up responses keep their CDN cold-fanout sharing, and per-user-filtered live polls share
~nothing across clients anyway. Remove when Electric fixes the live path (backlog 0001’s close).
optionalcors?:ElectricProxyCors
Defined in: packages/server/src/electric-proxy.ts:32
CORS for a browser-facing deployment with no CORS-adding gateway in front — e.g. a Supabase Cloud edge function, which the platform routes to directly. When set, OPTIONS preflights are answered here and the response carries the allowed origin plus the Electric headers the client must read off each shape. Omit it where a gateway already handles CORS (the local stack’s Envoy).
electricUrl
Section titled “electricUrl”electricUrl:
string
Defined in: packages/server/src/electric-proxy.ts:23
extraParams?
Section titled “extraParams?”
optionalextraParams?:Record<string,unknown>
Defined in: packages/server/src/electric-proxy.ts:25
Extra params passed to customWhere functions (e.g. fromLang, toLang).
logTimings?
Section titled “logTimings?”
optionallogTimings?:boolean
Defined in: packages/server/src/electric-proxy.ts:39
Opt-in per-request timing log (default off). When on, each forwarded shape request emits one compact
[pgxsinkit-timing] line (route "shape") with the request’s table/live/offset and the upstream
Electric fetch duration + status, for attributing read-path latency. Off by default — a pure
diagnostic surface that adds no standing query or latency when unset.
registry
Section titled “registry”registry:
SyncTableRegistry
Defined in: packages/server/src/electric-proxy.ts:22