loader.js: Navigate back if redirect target is `__BACK__`

This commit is contained in:
Johannes Meyer 2019-11-04 16:03:54 +01:00
parent 10d8715d1d
commit 42e596f457
1 changed files with 4 additions and 0 deletions

View File

@ -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');