mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: 优化网站 WAF 配置文件生成 (#5504)
This commit is contained in:
parent
b6d916de6a
commit
1577581257
@ -330,10 +330,8 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
|
|||||||
|
|
||||||
for _, domain := range domains {
|
for _, domain := range domains {
|
||||||
wafWebsite.Domains = append(wafWebsite.Domains, domain.Domain)
|
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)
|
websitesArray = append(websitesArray, wafWebsite)
|
||||||
websitesContent, err := json.Marshal(websitesArray)
|
websitesContent, err := json.Marshal(websitesArray)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user