wrangler dev - fetch() trust self signed certificates

Hello, i am using wrangler in a docker container in an local environment. i want to act the worker as a proxy, as i do in production. When i try to fetch() from another docker container, which itself puts out a self signed certificate, i get the error "failed: TLS peer's certificate is not trusted; reason = self signed certificate". Is there a chance to tell wrangler, to accept self signed certificates?
No description
3 Replies
fizzy_kombucha
fizzy_kombucha•15mo ago
try disabling ssl verification in your function's code: process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;
MrBBot
MrBBot•15mo ago
Hey! 👋 Wrangler should respect the NODE_EXTRA_CA_CERTS environment variable (https://nodejs.org/api/cli.html#node_extra_ca_certsfile), adding your self-signed certificate there should fix the issue.
Johnny Silverhand
Johnny SilverhandOP•14mo ago
Thanks MrBBot, that works :)
Want results from more Discord servers?
Add your server