UrlUpstream
Defined in: src/core/types.ts:183
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:190
Headers to add/override on the forwarded request.
rewritePath()?
Section titled “rewritePath()?”
optionalrewritePath: (path) =>string
Defined in: src/core/types.ts:188
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:186
Target URL (e.g. "https://api.example.com"). Validated at config time.
type:
"url"
Defined in: src/core/types.ts:184