-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded support for proxy config from environment variables #437
Conversation
Docs PR incoming for this as well. |
@kattrali can I get a review on this for merging? |
## | ||
# Parses and sets proxy from a uri | ||
def parse_proxy(uri) | ||
proxy = URI.parse(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be any problems if uri
was nil at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely, however this would only occur if parse_proxy
was called with nil
, in which case URI
would spit out a legible error i.e. **URI::InvalidURIError: bad URI(is not URI?):**
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could catch and log that error, but I think failing loudly is more valuable in most cases.
Expands setting of
config.proxy
options to bothENV['http_proxy']
andENV['https_proxy']
automatically.