From 15f75f17697a63221be59ceafe6c5339e2ed9f44 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 11 Mar 2024 00:35:28 +0330 Subject: [PATCH] [fix] set correct value if log paths is set to 'none' we also use the default value for the paths if its set to none --- web/html/xui/xray.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index c1e38fdf..20a36f63 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -1405,13 +1405,15 @@ templateSettings: { get: function () { const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null; + let accessLogPath = "./access.log"; + let errorLogPath = "./error.log"; if (parsedSettings) { - this.access = ["none", parsedSettings.log.access]; - this.error = ["none", parsedSettings.log.error]; - } else { - this.access = ["none", "./access.log"]; - this.error = ["none", "./error.log"]; + // if its set to "none" add default value + if (parsedSettings.log.access !== "none") accessLogPath = parsedSettings.log.access; + if (parsedSettings.log.error !== "none") errorLogPath = parsedSettings.log.error; } + this.access = ["none", accessLogPath]; + this.error = ["none", errorLogPath]; return parsedSettings; }, set: function (newValue) {