From 0bb5f7ef231ec4ffd7c4e7a0a275402415459c77 Mon Sep 17 00:00:00 2001 From: e01 Date: Sat, 23 Oct 2021 16:35:09 +0300 Subject: [PATCH] Fix getToken() #19 --- src/interface.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/interface.vue b/src/interface.vue index c9f2bd9..053ed97 100644 --- a/src/interface.vue +++ b/src/interface.vue @@ -342,7 +342,9 @@ export default defineComponent({ } function getToken() { - return api.defaults.headers?.['Authorization']?.split(' ')[1] || null; + return api.defaults.headers?.['Authorization']?.split(' ')[1] + || api.defaults.headers?.common?.['Authorization']?.split(' ')[1] + || null; } function addTokenToURL(url, token) {