UrlUpstream
Defined in: src/core/types.ts:139
Proxy to a remote URL. The gateway clones the request, rewrites headers,
and forwards it via fetch(). SSRF protection ensures the rewritten URL
stays on the same origin as the target.
Properties
Section titled “Properties”headers?
Section titled “headers?”
optionalheaders:Record<string,string>
Defined in: src/core/types.ts:146
Headers to add/override on the forwarded request.
rewritePath()?
Section titled “rewritePath()?”
optionalrewritePath: (path) =>string
Defined in: src/core/types.ts:144
Rewrite the path before forwarding. Must not change the origin.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
target
Section titled “target”target:
string
Defined in: src/core/types.ts:142
Target URL (e.g. "https://api.example.com"). Validated at config time.
type:
"url"
Defined in: src/core/types.ts:140