From 73df85312453c6ee3ee1a5e320a96630e4039e6f Mon Sep 17 00:00:00 2001 From: rxbn_ Date: Mon, 17 Aug 2020 10:11:45 +0200 Subject: [PATCH] web - proxy subdirectory fix --- res/web/js/custom.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/res/web/js/custom.js b/res/web/js/custom.js index a456e04..ebe74c0 100644 --- a/res/web/js/custom.js +++ b/res/web/js/custom.js @@ -25,8 +25,12 @@ function login() { if(json.message && json.message == "msg.auth.login.successful") { setTimeout(function () { - if(window.location.pathname == "/authenticate" && getParameterByName("appId")) window.location.href= "/authenticate"; - else window.location.href= "/"; + if( + window.location.pathname == "/authenticate" && + getParameterByName("appId") && + getParameterByName("redirectUrl") + ) window.location.reload(); + else window.location.href = "./"; }, 150); box.classList.add("uk-alert-success"); @@ -45,7 +49,7 @@ function logout() { ajax.send(""); ajax.onload = () => { let json = JSON.parse(ajax.responseText); - if(json.message && json.message == "msg.auth.logout.successful") window.location.href= "/"; + if(json.message && json.message == "msg.auth.logout.successful") window.location.href = "./"; }; } setTimeout(function () { @@ -61,7 +65,7 @@ function cancelRequest() { ajax.send(""); ajax.onload = () => { let json = JSON.parse(ajax.responseText); - if(json.message && json.message == "msg.request.operation.cancel.successful") window.location.href= "/"; + if(json.message && json.message == "msg.request.operation.cancel.successful") window.location.href = "./"; }; }