mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 13:47:15 +08:00
feat: 优化对 OpenResty 端口的处理
This commit is contained in:
@@ -221,11 +221,8 @@ func (r *Fail2banController) Add(ctx http.Context) http.Response {
|
||||
}
|
||||
var ports string
|
||||
for _, port := range config.Ports {
|
||||
if len(strings.Split(port, " ")) > 1 {
|
||||
ports += strings.Split(port, " ")[0] + ","
|
||||
} else {
|
||||
ports += port + ","
|
||||
}
|
||||
fields := strings.Fields(cast.ToString(port))
|
||||
ports += fields[0] + ","
|
||||
}
|
||||
|
||||
rule := `
|
||||
|
||||
Reference in New Issue
Block a user