From 10e5f4a5d5901527bab7ef86f4527ad208362754 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Thu, 30 Jan 2025 01:08:51 +0330 Subject: [PATCH] Update axios bearer token condition --- frontend/plugins/axios.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/plugins/axios.ts b/frontend/plugins/axios.ts index 04e524b..296a285 100644 --- a/frontend/plugins/axios.ts +++ b/frontend/plugins/axios.ts @@ -16,7 +16,7 @@ export default defineNuxtPlugin(() => { !config.url?.includes(API_ENDPOINTS.auth.signin) && !config.url?.includes(API_ENDPOINTS.account.send_otp) ) { - config.headers.Authorization = `Bearer ${token.value}`; + config.headers.Authorization = token.value ? `Bearer ${token.value}` : undefined; } return config;