File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import Axios from 'axios'
44// Axios.prototype cannot be modified
55const axiosExtra = {
66 setHeader ( name , value , scopes = 'common' ) {
7+ name = name . toLowerCase ( )
8+
79 for ( let scope of Array . isArray ( scopes ) ? scopes : [ scopes ] ) {
810 if ( ! value ) {
911 delete this . defaults . headers [ scope ] [ name ] ;
@@ -14,7 +16,7 @@ const axiosExtra = {
1416 } ,
1517 setToken ( token , type , scopes = 'common' ) {
1618 const value = ! token ? null : ( type ? type + ' ' : '' ) + token
17- this . setHeader ( 'Authorization ' , value , scopes )
19+ this . setHeader ( 'authorization ' , value , scopes )
1820 } ,
1921 onRequest ( fn ) {
2022 this . interceptors . request . use ( config => fn ( config ) || config )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ let reqCtr = 1
1212export default {
1313 computed: {
1414 axiosSessionId () {
15- return this .$axios .defaults .headers .common .sessionId
15+ return this .$axios .defaults .headers .common .sessionid
1616 },
1717
1818 axiosEncoding () {
You can’t perform that action at this time.
0 commit comments