fix: 优化防火墙启动时自动添加端口功能 (#6216)

Refs #6215
pull/6219/head
ssongliu 3 months ago committed by GitHub
parent 92a3982f21
commit 7297c2626f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -588,14 +588,6 @@ func (u *FirewallService) addPortsBeforeStart(client firewall.FirewallClient) er
if err := client.Port(fireClient.FireInfo{Port: "443", Protocol: "tcp", Strategy: "accept"}, "add"); err != nil {
return err
}
apps := u.loadPortByApp()
for _, app := range apps {
if len(app.HttpPort) != 0 && app.HttpPort != "0" {
if err := client.Port(fireClient.FireInfo{Port: app.HttpPort, Protocol: "tcp", Strategy: "accept"}, "add"); err != nil {
return err
}
}
}
return client.Reload()
}

Loading…
Cancel
Save