Replies: 1 comment
-
Hi @ns89-web, apologies for the late reply, I had to look into this as I didn't know the answer honestly! In Faraday, you can both set a proxy and provide a certificate file with some simple options (the code below is for the net-http adapter): options = {
proxy: 'https://proxy.com',
ssl: {
ca_file: '/path/to/proxy-cert.pem'
}
}
conn = Faraday.new('https://target-site.com/', **options) You can see how the options above are used in configure_ssl and net_http_connection methods. Now, as far as I know, this sets both the proxy and the certificate (*.pem) for the request. What I don't know though is if the certificate will be used only for the proxy or not! That might be the missing piece in case the above fails, but honestly I would need to have a working snippet using One more thing to do would be to checkout Sorry if I couldn't provide a clear solution to your issue! I hope this helps at least. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hello practicioners/ experts,
I am trying to implement the below curl command using Faraday; but I get a "end of file reached error":
Note: the proxy-cert.pem is a self-signed certificate
I am a newbie and would like to know how to achieve this using Faraday. I am unable to find an option equivalent to the --proxy-cacert in curl in most of Faraday's adapters.
The below code is something I tried using Net:HTTP and it does not work :
Error I get is as below :
Does any of Faraday's adapter's support this? Any pointers will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions