You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default the web client uses the global fetch. The idea is to configure the client with a custom fetch(er) that may decorate the fetch function with additional functionality. A use case for this could be -
Using mTLS: Cloudflare Workers can use mTLS with added bindings, the binding exposes a fetch(er) with mTLS pre-configured
Describe the solution you'd like
const client = createClient({
// A custom fetcher with decorated functionality, in this case a Cloudflare Worker binding with a fetcher preconfigured with mTLS
fetcher: cloudflareEnv.MY_CERT.fetch
})
You'll only need to double-check if the signature is compatible with that cloudflareEnv.MY_CERT.fetch like that right away. Then it just needs to be passed to the WebConnection and used instead of the default one there, if it is defined (see WebImpl in the same config.ts file).
If you have more questions, you can always DM me in the community Slack or comment here.
Use case
By default the web client uses the global fetch. The idea is to configure the client with a custom fetch(er) that may decorate the fetch function with additional functionality. A use case for this could be -
Using mTLS: Cloudflare Workers can use mTLS with added bindings, the binding exposes a fetch(er) with mTLS pre-configured
Describe the solution you'd like
Additional context
https://developers.cloudflare.com/workers/runtime-apis/bindings/mtls
The text was updated successfully, but these errors were encountered: