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'
4
4
// Axios.prototype cannot be modified
5
5
const axiosExtra = {
6
6
setHeader ( name , value , scopes = 'common' ) {
7
+ name = name . toLowerCase ( )
8
+
7
9
for ( let scope of Array . isArray ( scopes ) ? scopes : [ scopes ] ) {
8
10
if ( ! value ) {
9
11
delete this . defaults . headers [ scope ] [ name ] ;
@@ -14,7 +16,7 @@ const axiosExtra = {
14
16
} ,
15
17
setToken ( token , type , scopes = 'common' ) {
16
18
const value = ! token ? null : ( type ? type + ' ' : '' ) + token
17
- this . setHeader ( 'Authorization ' , value , scopes )
19
+ this . setHeader ( 'authorization ' , value , scopes )
18
20
} ,
19
21
onRequest ( fn ) {
20
22
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
12
12
export default {
13
13
computed: {
14
14
axiosSessionId () {
15
- return this .$axios .defaults .headers .common .sessionId
15
+ return this .$axios .defaults .headers .common .sessionid
16
16
},
17
17
18
18
axiosEncoding () {
You can’t perform that action at this time.
0 commit comments