Replies: 1 comment 6 replies
-
Hi @meridius, I did some digging and found that Faraday is indeed ignoring the env proxy, but That is clearly unwanted and I agree that Faraday should be forcing Net::HTTP not to do so if possible. In the meantime, if you need to disable it just for some calls, you could set |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there
I found out that Faraday is being used in the Inspec framework https://github.com/inspec/inspec for making HTTP requests.
My question is: How can I make Faraday ignore the global proxy settings (the
http_proxy
env var).Since I just found out about Faraday, I'm fairly new to Ruby and my use case is to make working Inspec test so I don't even know how to test it otherwise; I made a custom Inspec resource (copy&paste of https://github.com/inspec/inspec/blob/master/lib/inspec/resources/http.rb#L142).
I tried setting
Faraday.ignore_env_proxy = true
according to #752 but that didn't help.I also tried
Faraday.new(url, :proxy => '')
andconn.proxy=''
but that didn't work either.The only thing that works is to remove the ENV variable for whole Inspec by
http_proxy= inspec exec /tests
.Could you please advise what am I missing? I'd really want to be able to disable the proxy for specific calls instead.
Beta Was this translation helpful? Give feedback.
All reactions