mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
feat: WAF 增加 cdn 配置文件 (#4942)
This commit is contained in:
parent
5d9c09f69e
commit
76356eaf5b
@ -362,11 +362,11 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
|
|||||||
return err
|
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 {
|
for _, ruleName := range defaultRulesName {
|
||||||
srcPath := path.Join(defaultRuleDir, ruleName+".json")
|
srcPath := path.Join(defaultRuleDir, ruleName+".json")
|
||||||
if err = fileOp.Copy(srcPath, websiteRuleDir); err != nil {
|
if fileOp.Stat(srcPath) {
|
||||||
return err
|
_ = fileOp.Copy(srcPath, websiteRuleDir)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user