From 00e3db0caacbb892f2b650d51ca24ea58b95fa57 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 12 Mar 2024 23:54:04 +0100 Subject: [PATCH] remain rules on delete balancer --- web/html/xui/xray.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index d007d787..e8f2830a 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -1139,10 +1139,6 @@ let realIndex = newTemplateSettings.routing.balancers.findIndex((b) => b.tag === removedBalancer.tag); newTemplateSettings.routing.balancers.splice(realIndex, 1); - // Remove related routing rules - let rules = newTemplateSettings.routing.rules.filter((r) => !r.balancerTag || r.balancerTag !== removedBalancer.tag); - newTemplateSettings.routing.rules = rules; - // Update balancers property to an empty array if there are no more balancers if (newTemplateSettings.routing.balancers.length === 0) { delete newTemplateSettings.routing.balancers;