Open BernardoSM opened 5 months ago
Unfortunately we don't support mTLS bindings in local dev yet (https://developers.cloudflare.com/workers/testing/local-development/#supported-resource-bindings-in-different-environments) We should have better warnings/errors when this happens, sorry for the trouble.
In my case also deployed fetch seems like not working and I have no idea how to debug this.
Which Cloudflare product(s) does this pertain to?
Workers Runtime, Wrangler core
What version(s) of the tool(s) are you using?
^3.47.0 [Wrangler]
What version of Node are you using?
20.9.0
What operating system and version are you using?
Macos 15 (Beta)
Describe the Bug
Hi everyone, why I can't use mtls_certificates binding without --remote?
I created a brand new cf worker project with the following tutorial: https://developers.cloudflare.com/workers/get-started/guide/#1-create-a-new-worker-project I added the mtls certificate like the following tutorial: https://developers.cloudflare.com/workers/runtime-apis/bindings/mtls/#client-authentication-with-mtls
When I run the command wrangler dev the binding environment.MY_CERT is undefined.
But when I run the command with remote like wrangler dev --remote the binding starts to work.
Observed behavior
Is not possible to use mTLS binding fetch with no
--remote
command. This mean the binding isundefined
after you register it correctly and try to use.Expected behavior
The binding should work even if you don't use
--remote
command.Steps to reproduce
src/index.js
file with the following codewrangler dev
and you'll see env.MY_CERT isundefined
wrangler dev --remote
you'll see env.MY_CERT is notundefined
and more and fetch calls will start to workPlease provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response