Skip to content

Commit d568570

Browse files
authored
fix(router): fix wrong config key (#3220)
1 parent 2fef526 commit d568570

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cluster/router/tag/router.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ func (p *PriorityRouter) Route(invokers []base.Invoker, url *common.URL, invocat
5252
logger.Warnf("[tag router] invokers from previous router is empty")
5353
return invokers
5454
}
55-
// tag is valid in application
56-
key := strings.Join([]string{url.GetParam(constant.ApplicationKey, ""), constant.TagRouterRuleSuffix}, "")
55+
// get prefix from invoker
56+
application := invokers[0].GetURL().GetParam(constant.Tagkey, "")
57+
key := strings.Join([]string{application, constant.TagRouterRuleSuffix}, "")
5758
value, ok := p.routerConfigs.Load(key)
5859
if !ok {
5960
return staticTag(invokers, url, invocation)

0 commit comments

Comments
 (0)