I’m developing in an intranet environment and have disabled SSL API requests by setting NODE_TLS_REJECT_UNAUTHORIZED=0. When I use @forgeforge/brige’s requestJira function to retrieve data, I can retrieve data normally. However, when I use api.asApp().requestJira @forgerom @forge/api, I get the error [cause]: Error: unable to get local issuer certificate. Is there a way to circumvent this SSL issue?
This error unable_to_get_issuer_cert_locally usually appears when Node.js can’t verify the SSL certificate chain of the Jira server. It happens because the issuer’s (CA) certificate isn’t available in your local trust store. While setting NODE_TLS_REJECT_UNAUTHORIZED=0 disables certificate checks, it’s not recommended for production use. This typically happens in intranet or self-signed certificate environments where the certificate authority (CA) is not trusted by default.
To fix this, install or import the root and intermediate certificates of your internal CA into your system’s or Node.js trust store. You can also pass the CA certificate explicitly using the CA option in your request. This ensures secure communication without bypassing SSL validation. Whenever Node.js commences a request to an HTTPS-enabled server, it enters a complex predicament. I hope it helps!
