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
wrangler pages dev
I get an error rather than the expected response from the other service:
workerd/jsg/util.c++:275: error: e = kj/compat/tls.c++:221: failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate stack: 7ff699735100 7ff69977895c 0 0 0 7ff699ab4a48 7ff699ab58eb 7ff699ab7c18 0 0 0 7ff699a3938d 0 0; sentryErrorContext = jsgInternalError
workerd/jsg/util.c++:275: error: e = kj/compat/tls.c++:221: failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate stack: 7ff699735100 7ff69977895c 0 0 0 7ff699ab4a48 7ff699ab58eb 7ff699ab7c18 0 0 0 7ff699a3938d 0 0; sentryErrorContext = jsgInternalError
I have tried to run With several combinations of
NODE_EXTRA_CA_CERTS
NODE_EXTRA_CA_CERTS
,
SSL_CERT_FILE
SSL_CERT_FILE
and
NODE_TLS_REJECT_UNAUTHORIZED=0
NODE_TLS_REJECT_UNAUTHORIZED=0
but without any luck. Anything I could try to make this work?