Connecting to a local https server from wrangler pages dev on windows.
I have a pages project with a function that makes a fetch request to another service. Locally this is running on https://localhost:9002. Notice it's using TLS, and it has a self-signed certificate, outside of my control. When I try to run
wrangler pages dev
I get an error rather than the expected response from the other service:
I have tried to run With several combinations of NODE_EXTRA_CA_CERTS
, SSL_CERT_FILE
and NODE_TLS_REJECT_UNAUTHORIZED=0
but without any luck. Anything I could try to make this work?5 Replies
Same here but for workers. For me, it works when running natively (on mac) but inside of docker I get the same error. As far as I can tell, you can't fetch any https urls.
Here is a relevant issue but it's rather stale and supposedly fixed.
https://github.com/cloudflare/workers-sdk/issues/3264
GitHub
🐛 BUG: Wrangler dev fails to fetch() · Issue #3264 · cloudflare/wor...
Which Cloudflare product(s) does this pertain to? Wrangler What version of Wrangler are you using? 3.0.0 What operating system are you using? Windows 10 Describe the Bug After updating to the lates...
That issue claims that it has been fixed, but it doesn't appear to be.
That issue was different than what you are dealing with. Probably best to make a new issue
I have made a new issue: https://github.com/cloudflare/workers-sdk/issues/4257
GitHub
🐛 BUG: fetch cannot connect to local https server with self signed ...
Which Cloudflare product(s) does this pertain to? Pages What version(s) of the tool(s) are you using? 3.7.0 [Wrangler] What version of Node are you using? 18.13.0 What operating system are you usin...