mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-10 04:06:18 +00:00
[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
This commit is contained in:
parent
fb1f99e98d
commit
15f75f1769
1 changed files with 7 additions and 5 deletions
|
@ -1405,13 +1405,15 @@
|
||||||
templateSettings: {
|
templateSettings: {
|
||||||
get: function () {
|
get: function () {
|
||||||
const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null;
|
const parsedSettings = this.xraySetting ? JSON.parse(this.xraySetting) : null;
|
||||||
|
let accessLogPath = "./access.log";
|
||||||
|
let errorLogPath = "./error.log";
|
||||||
if (parsedSettings) {
|
if (parsedSettings) {
|
||||||
this.access = ["none", parsedSettings.log.access];
|
// if its set to "none" add default value
|
||||||
this.error = ["none", parsedSettings.log.error];
|
if (parsedSettings.log.access !== "none") accessLogPath = parsedSettings.log.access;
|
||||||
} else {
|
if (parsedSettings.log.error !== "none") errorLogPath = parsedSettings.log.error;
|
||||||
this.access = ["none", "./access.log"];
|
|
||||||
this.error = ["none", "./error.log"];
|
|
||||||
}
|
}
|
||||||
|
this.access = ["none", accessLogPath];
|
||||||
|
this.error = ["none", errorLogPath];
|
||||||
return parsedSettings;
|
return parsedSettings;
|
||||||
},
|
},
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
|
|
Loading…
Reference in a new issue