mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 20:49:03 +08:00
fix: 解决低版本 OpenResty 创建网站报错的问题 (#4661)
This commit is contained in:
parent
dcc0264b67
commit
b6b4bfe195
@ -288,6 +288,10 @@ func createWafConfig(website *model.Website, domains []model.WebsiteDomain) erro
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !common.CompareVersion(nginxInstall.Version, "1.21.4.3-2-0") {
|
||||
return nil
|
||||
}
|
||||
wafDataPath := path.Join(nginxInstall.GetPath(), "1pwaf", "data")
|
||||
fileOp := files.NewFileOp()
|
||||
if !fileOp.Stat(wafDataPath) {
|
||||
@ -419,6 +423,9 @@ func delWafConfig(website model.Website, force bool) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !common.CompareVersion(nginxInstall.Version, "1.21.4.3-2-0") {
|
||||
return nil
|
||||
}
|
||||
wafDataPath := path.Join(nginxInstall.GetPath(), "1pwaf", "data")
|
||||
fileOp := files.NewFileOp()
|
||||
if !fileOp.Stat(wafDataPath) {
|
||||
|
Loading…
Reference in New Issue
Block a user