mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-27 12:56:36 +08:00
优化WAF规则错误提示
This commit is contained in:
@@ -27,12 +27,12 @@ func (this *HTTPFirewallRule) Init() error {
|
||||
case HTTPFirewallRuleOperatorMatch:
|
||||
_, err := regexp.Compile(this.Value)
|
||||
if err != nil {
|
||||
return errors.New("regexp validate failed: " + err.Error())
|
||||
return errors.New("regexp validate failed: " + err.Error() + ", expression: " + this.Value)
|
||||
}
|
||||
case HTTPFirewallRuleOperatorNotMatch:
|
||||
_, err := regexp.Compile(this.Value)
|
||||
if err != nil {
|
||||
return errors.New("regexp validate failed: " + err.Error())
|
||||
return errors.New("regexp validate failed: " + err.Error() + ", expression: " + this.Value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user