Browse Source

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

pull/5509/head
zhengkunwang 5 months ago committed by GitHub
parent
commit
1577581257
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      backend/app/service/website_utils.go

4
backend/app/service/website_utils.go

@ -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)

Loading…
Cancel
Save