-
-
Notifications
You must be signed in to change notification settings - Fork 11k
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: support existing header instance as argument #5090
Conversation
What is the process for fixes like this to get merged and patch releases to come out? I've got code scanning security software complaining that I'm running a very old version of Axios (0.27) and I need to provide some guidance on when I'll adopt the obviously much more secure version 1.x :-) |
Hello ! I am not contributor here and I already approved this change. I hope this will get fixed at some points because axios-retry retrying the request with the config containing AxiosHeaders is broken |
Looks like something happened that requires yet another approval. |
@paulsouche It seems it wants you to approve again. Are you able? I'm so keen to get this one rolled in and released. I'm currently facing a serious choice of having to drop Axios altogether as I can't justify running a v0 release when a v1.1 already exists. |
Related to axios/axios#5090
@DigitalBrainJS does #5169 resolve this PR? |
Going to close this one in favour of #5162 |
@lohart13 No. PR #5169 does not add support for AxiosHeaders instance to be used as Axios header config but takes the first step in this direction. The implementation needs to go a bit deeper than just adding an assertion in one place and seems this PR doesn't solve the problem globally but adding a new config merge bug since completely ignores context headers. |
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.
Just tested this on Axios 1.1.3 by patching the files and it solves the problem
When an existing axios config is passed to the axios function, the headers are not read correctly and also the default headers don't get merged correctly therefore it is easier to get the default headers from the current instance of Axios.
This closes #5089.