cloudflare TLS peer's certificate is not trusted; reason = unable to get local issuer certificate
Hi, I'm trying to use a fetch request in a worker to access a site with a self-signed certificate. In Node.js, I can set the environment variable 'NODE_TLS_REJECT_UNAUTHORIZED' to 0 to get data, but it doesn't seem to work in a worker. Is there any way to make it possible to retrieve data from the destination site? P.S. I don't own the destination site.
1 Reply
i know it but the certificate is valid. I can access that site from my browser with out any issue or warning.
I'm not sure if it's a self-signed certificate. All I know is that I can access the site in my browser. However, when I use a fetch request to retrieve JSON data from a worker, it throws an error: 'Failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate.' In Node.js, it works when I set 'NODE_TLS_REJECT_UNAUTHORIZED.