From 8f830073cd41e0b55bebfa3d2cf5d9c9b51cea91 Mon Sep 17 00:00:00 2001 From: Bruce Schultz Date: Thu, 19 Sep 2024 13:51:33 +0200 Subject: [PATCH] fix(middleware): disable rerouting if response is 403 --- plugins/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.ts b/plugins/api.ts index 34b29d6..f7edf2d 100644 --- a/plugins/api.ts +++ b/plugins/api.ts @@ -23,7 +23,7 @@ export default defineNuxtPlugin(() => { }, async onResponseError({ request, response }) { // Handle the response errors - if (response.status === 401 || response.status === 403) { + if (response.status === 401) { console.warn("User not signed in, returning to login"); return login(); }