Skip to content

Commit

Permalink
allow empty route type
Browse files Browse the repository at this point in the history
default field
  • Loading branch information
Fangliding authored and yuhan6665 committed Dec 24, 2023
1 parent f51bf98 commit 9becf02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infra/conf/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ func ParseRule(msg json.RawMessage) (*router.RoutingRule, error) {
if err != nil {
return nil, newError("invalid router rule").Base(err)
}
if strings.EqualFold(rawRule.Type, "field") {
if rawRule.Type == "" || strings.EqualFold(rawRule.Type, "field") {
fieldrule, err := parseFieldRule(msg)
if err != nil {
return nil, newError("invalid field rule").Base(err)
Expand Down

0 comments on commit 9becf02

Please sign in to comment.