When implementing a RESTDataSource class for an Apollo server instance, how can I make it accept self signed certificates from my target REST API for development purposes?
I have process.env.NODE_TLS_REJECT_UNAUTHORIZEDset to 0 within my project, but this at least seems to have no impact.
Is there a rejectUnauthorised configuration option I can somehow set perhaps?
It proved to be a problem with my webpack configuration in the end, and a misunderstanding of how the webpack.DefinePlugin plugin works. With this corrected, setting process.env.NODE_TLS_REJECT_UNAUTHORIZED to "0" did in fact have the desired effect.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With