From dba4c86502d6692c3f6bd2d9f4a53c5758e78759 Mon Sep 17 00:00:00 2001 From: Lanius Trolling Date: Mon, 12 Jun 2023 10:35:26 -0400 Subject: [PATCH] Fix cookie name --- src/main/resources/static/init.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/static/init.js b/src/main/resources/static/init.js index 08d7627..0e5707b 100644 --- a/src/main/resources/static/init.js +++ b/src/main/resources/static/init.js @@ -314,15 +314,15 @@ pElement.append(aElement); document.currentScript.after(pElement); } else { - document.cookie = "RedirectedFrom=" + window.location.pathname + "; SameSite=Lax; Secure"; + document.cookie = "REDIRECTED_FROM=" + window.location.pathname + "; SameSite=Lax; Secure"; window.location = redirectTo; } }; window.checkRedirectTarget = function () { - const redirectSourceValues = document.cookie.split(';').filter(value => value.trim().startsWith("RedirectedFrom=")); + const redirectSourceValues = document.cookie.split(';').filter(value => value.trim().startsWith("REDIRECTED_FROM=")); if (redirectSourceValues.length > 0) { - const redirectSource = new URL(redirectSourceValues[0].trim().substring("RedirectedFrom=".length), window.location.origin); + const redirectSource = new URL(redirectSourceValues[0].trim().substring("REDIRECTED_FROM=".length), window.location.origin); if (redirectSource.search.length > 0) { redirectSource.search += "&redirect=no"; } else { @@ -343,6 +343,6 @@ document.currentScript.after(pElement); } - document.cookie = "RedirectedFrom=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax; Secure"; + document.cookie = "REDIRECTED_FROM=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax; Secure"; }; })(); -- 2.25.1