Skip to content

Contribution to fix multiple issues with proxy support #4318

@mbargiel

Description

@mbargiel

Describe the issue

This is not exactly a support question, but your PR bot is extremely aggressive and does not allow submitting a blank report, even one created from the New Issue flow.) On with the issue... 🤞

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

At first I tried using some of the suggestions here like using https-proxy-agent, but it is severely limited in that it does not normal agent options (I hear it's a regression, and the lib is more or less abandoned). So I went for a deep-dive and I managed to isolate a certain number of flaws. I fixed them using patch-package but I'm willing to contribute them back and open separate PRs for each of these issues (along with tests), when time permits. Would you welcome this?

Issues I believe my changes can fix:

Other changes that I made in my patch:

  • Enable re-evaluation of http_proxy, https_proxy and no_proxy (when not passing an explicit proxy config option) when following redirects (http_proxy and https_proxy could be configured differently)

The patch is fairly large and would probably be better conveyed as multiple PRs, but I'll share it below. (We have 160 tests in our project confirming the patch solves a number of issues, but I can't share them here; I would contribute with axios test coverage instead.)

Example Code

N/A

Expected behavior, if applicable

N/A

Environment

  • Axios Version [0.24.0]
  • Adapter [HTTP]
  • Browser [(N/A)]
  • Browser Version [(N/A)]
  • Node.js Version [12.20.0]
  • OS: [Windows 10, macOS Catalina]
  • Additional Library Versions [[email protected]]

Additional context/Screenshots

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions