首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RouteRule名称重要吗?

RouteRule名称重要吗?
EN

Stack Overflow用户
提问于 2020-09-04 02:53:58
回答 1查看 47关注 0票数 0

我正在尝试理解Apigee RouteRule (https://docs.apigee.com/api-platform/fundamentals/understanding-routes?hl=lv)

代码语言:javascript
复制
<RouteRule name="MyRoute">
   <Condition>request.header.routeTo = "TargetEndpoint1"</Condition>
   <TargetEndpoint>TargetEndpoint1</TargetEndpoint>
</RouteRule>
<RouteRule name="default">
   <TargetEndpoint>TargetEndpoint2</TargetEndpoint>
</RouteRule>

我的问题是,如果我更改规则名称,是否重要?

例如,我将MyRoute更改为YourRoute,然后它变成

代码语言:javascript
复制
<RouteRule name="YourRoute">
   <Condition>request.header.routeTo = "TargetEndpoint1"</Condition>
   <TargetEndpoint>TargetEndpoint1</TargetEndpoint>
</RouteRule>
<RouteRule name="default">
   <TargetEndpoint>TargetEndpoint2</TargetEndpoint>
</RouteRule>

我找不到路由规则名称在其他地方被引用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-10 18:00:45

这里只是您为RouteRule策略指定的名称。可以有多个路由规则,因此为了方便起见,可以区分这些规则。策略名称不会在它们只包含在代理流xml中的任何地方被引用。它与或非常相似。直到它被添加到代理流中,它才会被执行。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63729986

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档