From 42e596f4577f7b0fca2e6fad0fd4651223ca6124 Mon Sep 17 00:00:00 2001 From: Johannes Meyer <johannes.meyer@icinga.com> Date: Mon, 4 Nov 2019 16:03:54 +0100 Subject: [PATCH] loader.js: Navigate back if redirect target is `__BACK__` --- public/js/icinga/loader.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 3ab5268cf..7c9962051 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -457,6 +457,10 @@ // redirect to the link's URL instead of the current window's URL (see above) redirect = redirect.replace(/__SELF__/, req.url); } + } else if (redirect.match(/__BACK__/)) { + // Navigate back, no redirect desired + window.history.back(); + return true; } var useHttp = req.getResponseHeader('X-Icinga-Redirect-Http');