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

Handle HTTPS_PROXY in http.Transport #22

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

David-Crty
Copy link

what

  • Adding the possibility to properly handle the HTTPS_PROXY env var

why

  • In some infra context the remote GitHub endpoint (eg: api.github.com is accessible only through a remote proxy)
  • Currently if you set HTTPS_PROXY, the variable is ignored

references

Let me know if can do more to get this feature merged

@David-Crty David-Crty requested a review from a team as a code owner July 11, 2023 11:34
return transport.RoundTrip(r)
}

func (rt roundTripper) getTransport() *http.Transport {
proxyURLStr := os.Getenv("HTTPS_PROXY")
transport := &http.Transport{
Copy link
Member

Choose a reason for hiding this comment

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

@David-Crty are your sure this should be pointer ?

Suggested change
transport := &http.Transport{
transport := http.Transport{

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.

3 participants