From 9becf02316472a186d99e507ce65345f19c8d71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E6=89=87=E6=BB=91=E7=BF=94=E7=BF=BC?= Date: Fri, 22 Dec 2023 18:27:03 +0800 Subject: [PATCH] allow empty route type default field --- infra/conf/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/conf/router.go b/infra/conf/router.go index a9f57cd6..79176fa5 100644 --- a/infra/conf/router.go +++ b/infra/conf/router.go @@ -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)