Remove spaces from service rule set names

Updated generateServiceRules to strip spaces from service names when generating rule set identifiers, ensuring consistent formatting and preventing issues with rule matching.
This commit is contained in:
xixu-me committed 2025-11-28 14:21:26 +08:00
1 parent 533a66002b
commit 3f3b097740
1 file changed
+3 -1
+3 -1
View File
@@ -489,7 +489,9 @@ const proxyGroups = [
// Routing Rules
function generateServiceRules(services) {
return services.map(({ name }) => `RULE-SET,${name.toLowerCase()},${name}`);
return services.map(
({ name }) => `RULE-SET,${name.toLowerCase().replace(/\s+/g, "")},${name}`
);
}
const rules = [