mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 15:00:27 +08:00
增加自动升级一处WAF规则
This commit is contained in:
@@ -216,5 +216,13 @@ func upgradeV0_5_8(db *dbs.DB) error {
|
||||
|
||||
// v1.2.9
|
||||
func upgradeV1_2_9(db *dbs.DB) error {
|
||||
// 升级WAF规则
|
||||
{
|
||||
_, err := db.Exec("UPDATE edgeHTTPFirewallRules SET value=? WHERE value=? AND param='${userAgent}'", "python|pycurl|http-client|httpclient|apachebench|nethttp|http_request|java|perl|ruby|scrapy|php\\b|rust", "python|pycurl|http-client|httpclient|apachebench|nethttp|http_request|java|perl|ruby|scrapy|php|rust")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user