Browse Source

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

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

4
backend/app/service/website.go

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