mirror of
https://gitee.com/fit2cloud-feizhiyun/1Panel.git
synced 2024-12-06 05:48:18 +08:00
feat: 优化网站 WAF 配置文件生成 (#5504)
This commit is contained in:
parent
b6d916de6a
commit
1577581257
@ -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…
Reference in New Issue
Block a user