Created
November 25, 2016 21:36
-
-
Save EQuimper/dc5fe02dcaca4469091729e1313f78d1 to your computer and use it in GitHub Desktop.
Axios add Authorization headers for default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios.defaults.headers.common['Authorization'] = store.getState().auth.user.token; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should't that be
'Bearer ' + sotre.getState().auth.user.token;
?