I'm trying to call a dev environment REST service from my phoenix server, but I don't want to whitelist the CA. For the record, I don't even know how to add the CA key to Phoenix's whitelist.
How to do https request from phoenix while also ignoring the SSL's CA error?
To bypass SSL certificate validation for local and test servers, you can pass the -k or --insecure option to the Curl command. This option explicitly tells Curl to perform "insecure" SSL connections and file transfers. Curl will ignore any security warnings about an invalid SSL certificate and accept it as valid.
InsecureSkipVerify means that there is NO authentication; and it's ripe for a Man-In-The-Middle; defeating the purpose of using TLS.
Output. We are easily getting a response from the above https URL, and it is because the request module can verify the SSL certificate. You can disable the SSL verification by simply adding verify=False as shown in the example below.
Using HTTPoison, you need to pass the :insecure
hackney option.
HTTPoison.get! url, [], hackney: [:insecure]
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