File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ 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
-
9
7
for ( let scope of Array . isArray ( scopes ) ? scopes : [ scopes ] ) {
10
8
if ( ! value ) {
11
9
delete this . defaults . headers [ scope ] [ name ] ;
@@ -16,7 +14,7 @@ const axiosExtra = {
16
14
} ,
17
15
setToken ( token , type , scopes = 'common' ) {
18
16
const value = ! token ? null : ( type ? type + ' ' : '' ) + token
19
- this . setHeader ( 'authorization ' , value , scopes )
17
+ this . setHeader ( 'Authorization ' , value , scopes )
20
18
} ,
21
19
onRequest ( fn ) {
22
20
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 () {
@@ -22,7 +22,7 @@ export default {
22
22
fetch ({ app, route }) {
23
23
const doLogin = route .query .login !== undefined
24
24
if (doLogin) {
25
- app .$axios .setHeader (' sessionId ' , reqCtr++ )
25
+ app .$axios .setHeader (' SessionId ' , reqCtr++ )
26
26
}
27
27
}
28
28
}
You can’t perform that action at this time.
0 commit comments