mTLS for Workers can be used for requests made to services that are not proxied on Cloudflare, or alternatively used to gain visibility into certificate details and optionally add your own programmatic logic for further checks or actions.
Expose mTLS headers
All Client Certificate details can be found in the tlsClientAuth object in Cloudflare Workers.
Example Cloudflare Workers code to return all headers and gain visibility, including Client Certificate headers:
The response when using the browser with a P12 Certificate to visit the mTLS hostname would look similar to this example:
This approach can also be useful to handle additional checks and logic on the mTLS via the Cloudflare Workers.
Was this helpful?
What did you like?
What went wrong?
Thank you for helping improve Cloudflare's documentation!