hostname ≠ ui-domain

We need a additional variable for the mailcow-ui-domain, if the domain used for the mailcow ui differs from the hostname. Otherwise our users will get the login promt, when they try to access the mobileconfig file.
Dieser Commit ist enthalten in:
heavygale 2019-01-26 22:25:49 +01:00
Ursprung 361f75390c
Commit c84381ab5f

Datei anzeigen

@ -21,6 +21,9 @@ if (window.location.href.indexOf('/client/') >= 0) {
if (getParameterByName('name')) {
setCookie("name", getParameterByName('name'));
}
if (getParameterByName('ui')) {
setCookie("ui", getParameterByName('ui'));
}
if (getParameterByName('port')) {
setCookie("port", getParameterByName('port'));
}
@ -71,12 +74,12 @@ if (window.location.href.indexOf('/client') >= 0) {
el.innerText = getCookie('host');
});
Array.prototype.forEach.call(document.getElementsByClassName('client_var_link'), function(el) {
if (!getCookie('host')) {
if (!getCookie('ui')) {
el.href = '#';
} else if (getCookie('port') != '443') {
el.href = 'https://' + getCookie('host') + ':' + getCookie('port') + '/' + el.getAttribute("href");
el.href = 'https://' + getCookie('ui') + ':' + getCookie('port') + '/' + el.getAttribute("href");
} else {
el.href = 'https://' + getCookie('host') + '/' + el.getAttribute("href");
el.href = 'https://' + getCookie('ui') + '/' + el.getAttribute("href");
}
});
Array.prototype.forEach.call(document.getElementsByClassName('client_var_email'), function(el) {