From 15fdb5843313b9efb21fc8ac636ef29cac532e4b Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Sun, 21 May 2023 06:08:03 +0430 Subject: [PATCH] FIX redirect after restart panel --- web/html/xui/settings.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index f1da86d1..b786639c 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -426,7 +426,12 @@ if (msg.success) { this.loading(true); await PromiseUtil.sleep(5000); - window.location.replace(this.allSetting.webBasePath + "xui/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 resetXrayConfigToDefault() {