Update config-editor.tsx
This commit is contained in:
1 parent
f310aa2d32
commit
b0538f6e3c
1 file changed
+6
-2
@@ -96,7 +96,11 @@ const ConfigEditorPage: React.FC = () => {
|
|||||||
// Get the key and value
|
// Get the key and value
|
||||||
const splitLine = line.split(':');
|
const splitLine = line.split(':');
|
||||||
splitLine[0] = splitLine[0].trim();
|
splitLine[0] = splitLine[0].trim();
|
||||||
splitLine[1] = splitLine[1].trim();
|
let val = '';
|
||||||
|
for (let j = 1;j<splitLine.length;j++) {
|
||||||
|
val += splitLine[j];
|
||||||
|
}
|
||||||
|
val = val.trim();
|
||||||
|
|
||||||
if (splitLine[0].includes('proxy-protocol-whitelisted-ips')) {
|
if (splitLine[0].includes('proxy-protocol-whitelisted-ips')) {
|
||||||
currentComment = '';
|
currentComment = '';
|
||||||
@@ -111,7 +115,7 @@ const ConfigEditorPage: React.FC = () => {
|
|||||||
newConfig[currentSection] = newConfig[currentSection] || {};
|
newConfig[currentSection] = newConfig[currentSection] || {};
|
||||||
newConfig[currentSection][splitLine[0]] = {
|
newConfig[currentSection][splitLine[0]] = {
|
||||||
desc: currentComment,
|
desc: currentComment,
|
||||||
value: splitLine[1],
|
value: val,
|
||||||
line: i
|
line: i
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user