mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-23 06:42:41 +00:00
remove duplicate code
This commit is contained in:
parent
5d84ed255d
commit
5df9b4f5c2
1 changed files with 2 additions and 3 deletions
|
|
@ -322,8 +322,9 @@
|
|||
const { webDomain, webPort, webBasePath, webCertFile, webKeyFile } = this.allSetting;
|
||||
const newProtocol = (webCertFile || webKeyFile) ? "https:" : "http:";
|
||||
|
||||
if (!this.entryIsIP) {
|
||||
const base = webBasePath ? webBasePath.replace(/^\//, "") : "";
|
||||
|
||||
if (!this.entryIsIP) {
|
||||
const url = new URL(window.location.href);
|
||||
url.pathname = `/${base}panel/settings`;
|
||||
window.location.replace(url.toString());
|
||||
|
|
@ -341,8 +342,6 @@
|
|||
finalPort = String(webPort);
|
||||
}
|
||||
|
||||
const base = webBasePath ? webBasePath.replace(/^\//, "") : "";
|
||||
|
||||
const url = new URL(`${newProtocol}//${finalHost}`);
|
||||
if (finalPort) url.port = finalPort;
|
||||
url.pathname = `/${base}panel/settings`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue