Skip to content

Commit

Permalink
fix(middleware): disable rerouting if response is 403
Browse files Browse the repository at this point in the history
  • Loading branch information
brucetony committed Sep 19, 2024
1 parent 51c97e7 commit 8f83007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 8f83007

Please sign in to comment.