From ab317b428aa7a75d9f1c31084dc56adff026b209 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Fri, 20 May 2022 15:04:13 +0200 Subject: [PATCH] add return to --- docker/nginx/templates/pages/401.html.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/nginx/templates/pages/401.html.template b/docker/nginx/templates/pages/401.html.template index 2e7c9853..1bb1028f 100644 --- a/docker/nginx/templates/pages/401.html.template +++ b/docker/nginx/templates/pages/401.html.template @@ -81,7 +81,8 @@ // prevent auto redirect if not on portal domain to allow local development if (window.location.hostname.endsWith("${PORTAL_DOMAIN}")) { setTimeout(function redirect() { - window.location.href = "https://account.${PORTAL_DOMAIN}/auth/login"; + const encodedReturnTo = encodeURIComponent(window.location.href); + window.location.href = `https://account.${PORTAL_DOMAIN}/auth/login?return_to=${encodedReturnTo}`; }, 5000); // redirect after 5 secons }