FIX redirect after restart panel

This commit is contained in:
Hamidreza Ghavami 2023-05-20 18:58:51 +04:30
parent 419a1938ee
commit c7e300f14d
No known key found for this signature in database
GPG key ID: 402C6797325182D9

View file

@ -480,7 +480,12 @@
if (msg.success) {
this.loading(true);
await PromiseUtil.sleep(5000);
window.location.replace(this.allSetting.webBasePath + "panel/settings");
let protocol = "http://";
if (this.allSetting.webCertFile !== "") {
protocol = "https://";
}
const { host, pathname } = window.location;
window.location.replace(protocol + host + this.allSetting.webBasePath + pathname.slice(1));
}
},
async fetchUserSecret() {