fix: 修复域名删除导致网站访问被 WAF 拦截的问题 (#6337)

Refs https://github.com/1Panel-dev/1Panel/issues/6336
pull/6348/head
zhengkunwang 3 months ago committed by GitHub
parent cf8aa86a67
commit 051f670453
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -641,8 +641,10 @@ func (w WebsiteService) DeleteWebsiteDomain(domainId uint) error {
wafSite := wafWebsite
oldDomains := wafSite.Domains
var newDomains []string
removed := false
for _, domain := range oldDomains {
if domain == webSiteDomain.Domain {
if domain == webSiteDomain.Domain && !removed {
removed = true
continue
}
newDomains = append(newDomains, domain)

Loading…
Cancel
Save