Describe the bug
Since Axios 0.23 and the inclusion of axios/axios#4140 types have changed for global headers.
It is now forbidden to set axios.defaults.headers.Authorization = 'Bearer {auth_token}' and it must be set in axios.defaults.headers.common instead.
However vue-auth-plugin skip non-strings value in
|
&& this.options.headerTokenReplace |
Header is not replaced, and authenticated requests failed.
Expected behavior
Header should be replaced.
Additional context
Maybe the test should go deeper to handle common, get, post, etc, headers.
Describe the bug
Since Axios 0.23 and the inclusion of axios/axios#4140 types have changed for global headers.
It is now forbidden to set
axios.defaults.headers.Authorization = 'Bearer {auth_token}'and it must be set inaxios.defaults.headers.commoninstead.However vue-auth-plugin skip non-strings value in
vue-auth-plugin/src/lib/auth-vue-http.ts
Line 173 in fda160e
Header is not replaced, and authenticated requests failed.
Expected behavior
Header should be replaced.
Additional context
Maybe the test should go deeper to handle
common,get,post, etc, headers.