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

fix: restore proxy config backwards compatibility with 0.x #5097

Merged
merged 3 commits into from Oct 13, 2022

Conversation

ppati000
Copy link
Contributor

This pull request fixes #5079.

Since 1.x, the proxy configuration has been backwards incompatible with 0.x versions:

  • hostname instead of host
  • protocol value requires a trailing : character

This pull request essentially makes Axios compatible with both 1.x- and 0.x-style configurations. One caveat: if both hostname and host are given, hostname takes precedence. This behavior is consistent with the Node.js http module [0].

[0] https://nodejs.org/api/http.html#httprequesturl-options-callback

Copy link
Member

@jasonsaayman jasonsaayman left a comment

Choose a reason for hiding this comment

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

Looks good thanks 🚀

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.

GET request with proxy doesn't work on v1.1.2
2 participants