Skip to content
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

Honor http_proxy environment variables #1111

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Jan 9, 2025

Fixes #787

Adds option to read http_proxy from environment (also checks https_proxy and prioritizes this if it exists). If this flag is set to true, it will overwrite any previously set proxies with sentry_options_set_proxy.

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 6.25000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 82.48%. Comparing base (3981ea7) to head (2a8df33).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1111      +/-   ##
==========================================
- Coverage   82.62%   82.48%   -0.15%     
==========================================
  Files          53       53              
  Lines        7896     7912      +16     
  Branches     1234     1236       +2     
==========================================
+ Hits         6524     6526       +2     
- Misses       1261     1276      +15     
+ Partials      111      110       -1     

Comment on lines +141 to +143
if (options->read_proxy_from_environment) {
sentry__set_proxy_from_environment(options);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this new option, I'm not sure we still need to support no_proxy; if users want to use the environment variable value in their own code, they can just not set this flag to true (which is the default anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Honor http_proxy environment variables
1 participant