Skip to content

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.

optional headers: Record<string, string>

Defined in: src/core/types.ts:146

Headers to add/override on the forwarded request.


optional rewritePath: (path) => string

Defined in: src/core/types.ts:144

Rewrite the path before forwarding. Must not change the origin.

string

string


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