Skip to content

Commit

Permalink
feat: 优化网站 WAF 配置文件生成 (#5504)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored Jun 19, 2024
1 parent b6d916d commit 1577581
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/app/service/website_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1577581

Please sign in to comment.