- 在检查 HTTP 和 HTTPS 端口冲突时,排除当前规则本身 -修复了修改规则时误报端口已被占用的问题
@@ -579,6 +579,9 @@ func (s *wafFormatterService) verifyWebForwardingPort(ctx context.Context, proto
for _, rule := range existingRules {
// 关键检查:HTTP 和 HTTPS 不能在同一个端口上共存。
if rule.IsHttps != isNewRuleHTTPS {
+ if int64(rule.Id) == id {
+ continue
+ }
return errPortInUse
}