mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-13 21:13:09 +00:00
fix: trim whitespace
Co-authored-by: MHSanaei <ho3ein.sanaei@gmail.com>
This commit is contained in:
@@ -220,13 +220,13 @@
|
|||||||
newRule = {};
|
newRule = {};
|
||||||
rule.type = "field";
|
rule.type = "field";
|
||||||
rule.domainMatcher = value.domainMatcher;
|
rule.domainMatcher = value.domainMatcher;
|
||||||
rule.domain = value.domain.length>0 ? value.domain.split(',') : [];
|
rule.domain = value.domain.length>0 ? value.domain.split(',').map(s => s.trim()) : [];
|
||||||
rule.ip = value.ip.length>0 ? value.ip.split(',') : [];
|
rule.ip = value.ip.length>0 ? value.ip.split(',').map(s => s.trim()) : [];
|
||||||
rule.port = value.port;
|
rule.port = value.port;
|
||||||
rule.sourcePort = value.sourcePort;
|
rule.sourcePort = value.sourcePort;
|
||||||
rule.network = value.network;
|
rule.network = value.network;
|
||||||
rule.source = value.source.length>0 ? value.source.split(',') : [];
|
rule.source = value.source.length>0 ? value.source.split(',').map(s => s.trim()) : [];
|
||||||
rule.user = value.user.length>0 ? value.user.split(',') : [];
|
rule.user = value.user.length>0 ? value.user.split(',').map(s => s.trim()) : [];
|
||||||
rule.inboundTag = value.inboundTag;
|
rule.inboundTag = value.inboundTag;
|
||||||
rule.protocol = value.protocol;
|
rule.protocol = value.protocol;
|
||||||
rule.attrs = Object.fromEntries(value.attrs);
|
rule.attrs = Object.fromEntries(value.attrs);
|
||||||
|
|||||||
Reference in New Issue
Block a user