You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if headers.common is not an instance of AxiosHeaders then headers[config.method] (config.method === 'get') will return not the headers object but a reference to the getter method of the AxiosHeaders class instance.
In that case the utils.merge will fall into the default else case:
Describe the bug
axios/lib/core/Axios.js
Line 73 in ab77a40
if
headers.common
is not an instance ofAxiosHeaders
thenheaders[config.method]
(config.method === 'get') will return not the headers object but a reference to the getter method of the AxiosHeaders class instance.In that case the utils.merge will fall into the default else case:
axios/lib/utils.js
Line 305 in ab77a40
And assign a function to the headers object. The request is malformed at this point.
To Reproduce
https://github.com/magom001/axios-jwt-auth/tree/1682dd6bdd20b1d4a619aff71554f92f14ae1b1e, update axios to 1.1.3 and run unit tests.
Code snippet
The text was updated successfully, but these errors were encountered: