Add synchronous redirect-bootstrap, direct KeyCape OIDC on sign-in, and mount watching so the UI no longer lands on ?with=token when netkingdom is hidden from unauthenticated mount listing. Document listing_visibility tune helper.
23 lines
547 B
JavaScript
23 lines
547 B
JavaScript
(function () {
|
|
"use strict";
|
|
|
|
var path = window.location.pathname;
|
|
if (path.indexOf("/oidc/") !== -1) {
|
|
return;
|
|
}
|
|
|
|
if (!/\/ui\/vault\/auth(?:\/|$)/.test(path) && !/\/ui\/?$/.test(path)) {
|
|
return;
|
|
}
|
|
|
|
var params = new URLSearchParams(window.location.search);
|
|
var current = (params.get("with") || "").replace(/\/$/, "");
|
|
if (current === "netkingdom" || current === "keycape") {
|
|
return;
|
|
}
|
|
|
|
params.set("with", "netkingdom/");
|
|
window.location.replace(
|
|
window.location.pathname + "?" + params.toString()
|
|
);
|
|
})(); |