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

Support for Axios >= 0.23 & Typescript with common headers #357

Open
Glandos opened this issue Dec 2, 2021 · 0 comments
Open

Support for Axios >= 0.23 & Typescript with common headers #357

Glandos opened this issue Dec 2, 2021 · 0 comments

Comments

@Glandos
Copy link
Contributor

Glandos commented Dec 2, 2021

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.

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

No branches or pull requests

1 participant