From 4353f5e03658778b526dca6b7dd3f5bd6e31e121 Mon Sep 17 00:00:00 2001 From: Pierre <397503+bemble@users.noreply.github.com> Date: Mon, 16 May 2022 14:52:46 +0200 Subject: feat(auth): handle unauthorized request in connectivity Reload page without cache if 401 and 403 status in response --- src/components/ConnectivityChecker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/ConnectivityChecker.vue b/src/components/ConnectivityChecker.vue index 1c677d2..0d7e79f 100644 --- a/src/components/ConnectivityChecker.vue +++ b/src/components/ConnectivityChecker.vue @@ -63,7 +63,7 @@ export default { }) .then(function (response) { // opaqueredirect means request has been redirected, to auth provider probably - if (response.type === "opaqueredirect" && !response.ok) { + if ((response.type === "opaqueredirect" && !response.ok) || [401, 403].indexOf(response.status) != -1) { window.location.href = window.location.href + "?t="+(new Date().valueOf()); } that.offline = !response.ok; -- cgit v1.2.3