mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 09:02:42 +08:00
fix: 修复域名删除导致网站访问被 WAF 拦截的问题 (#6337)
Refs https://github.com/1Panel-dev/1Panel/issues/6336
This commit is contained in:
parent
cf8aa86a67
commit
051f670453
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue