diff --git a/api/newV2board/v2board.go b/api/newV2board/v2board.go index 4168c35..c8530fa 100644 --- a/api/newV2board/v2board.go +++ b/api/newV2board/v2board.go @@ -255,7 +255,7 @@ func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error) { if r["action"] == "block" { ruleListItem := api.DetectRule{ ID: i, - Pattern: regexp.MustCompile(r["match"].(string)), + Pattern: regexp.MustCompile(strings.TrimPrefix(r["match"].(string), "regexp:")), } ruleList = append(ruleList, ruleListItem) } diff --git a/app/mydispatcher/default.go b/app/mydispatcher/default.go index 086b127..436f2dd 100644 --- a/app/mydispatcher/default.go +++ b/app/mydispatcher/default.go @@ -535,7 +535,7 @@ func (d *DefaultDispatcher) routedDispatch(ctx context.Context, link *transport. } if handler == nil { - handler = d.ohm.GetHandler(inTag) // Default outbound hander tag should be as same as the inbound tag + handler = d.ohm.GetHandler(inTag) // Default outbound handler tag should be as same as the inbound tag } // If there is no outbound with tag as same as the inbound tag