Browse Source

feat: WAF 增加 cdn 配置文件 (#4942)

pull/4954/head
zhengkunwang 7 months ago committed by GitHub
parent
commit
76356eaf5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      backend/app/service/website_utils.go

6
backend/app/service/website_utils.go

@ -362,11 +362,11 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
return err
}
}
defaultRulesName := []string{"acl", "args", "cookie", "defaultUaBlack", "defaultUrlBlack", "fileExt", "header", "methodWhite"}
defaultRulesName := []string{"acl", "args", "cookie", "defaultUaBlack", "defaultUrlBlack", "fileExt", "header", "methodWhite", "cdn"}
for _, ruleName := range defaultRulesName {
srcPath := path.Join(defaultRuleDir, ruleName+".json")
if err = fileOp.Copy(srcPath, websiteRuleDir); err != nil {
return err
if fileOp.Stat(srcPath) {
_ = fileOp.Copy(srcPath, websiteRuleDir)
}
}

Loading…
Cancel
Save