Skip to content

Commit 4322bb4

Browse files
committed
fix(apiClient): usage token on client side
1 parent 09bcb83 commit 4322bb4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/helpers/apiClient.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,14 @@ export default function apiClient(req) {
1919
conf.headers.Cookie = req.header('cookie');
2020
}
2121
if (req.header('authorization')) {
22-
conf.headers.authorization = token || req.header('authorization') || '';
22+
conf.headers.authorization = req.header('authorization');
2323
}
2424
}
25+
26+
if (token) {
27+
conf.headers.authorization = token;
28+
}
29+
2530
return conf;
2631
},
2732
error => Promise.reject(error)

0 commit comments

Comments
 (0)