ServiceBindingUpstream
Defined in: src/core/types.ts:200
Forward to another Cloudflare Worker via a Service Binding.
The binding must be configured in the consumer’s wrangler.jsonc.
Type Parameters
Section titled “Type Parameters”TBindings
Section titled “TBindings”TBindings = Record<string, unknown>
Worker bindings type. When provided, service
autocompletes to valid binding names from your Env interface.
Properties
Section titled “Properties”rewritePath()?
Section titled “rewritePath()?”
optionalrewritePath: (path) =>string
Defined in: src/core/types.ts:205
Rewrite the path before forwarding to the bound service.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
service
Section titled “service”service:
Extract<keyofTBindings,string>
Defined in: src/core/types.ts:203
Name of the Service Binding in wrangler.jsonc (e.g. "AUTH_SERVICE").
type:
"service-binding"
Defined in: src/core/types.ts:201