feat: 优化网站 WAF 配置文件生成 (#5504)

This commit is contained in:
zhengkunwang 2024-06-19 17:42:57 +08:00 committed by GitHub
parent b6d916de6a
commit 1577581257
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,9 +330,7 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
for _, domain := range domains {
wafWebsite.Domains = append(wafWebsite.Domains, domain.Domain)
if domain.Port != 80 && domain.Port != 443 {
wafWebsite.Host = append(wafWebsite.Host, domain.Domain+":"+strconv.Itoa(domain.Port))
}
wafWebsite.Host = append(wafWebsite.Host, domain.Domain+":"+strconv.Itoa(domain.Port))
}
websitesArray = append(websitesArray, wafWebsite)
websitesContent, err := json.Marshal(websitesArray)