昨天遇到一个路由优先级配置问题导致的事故,分享下,看下有没有什么好的方案 #7612
Unanswered
Lewisyixin
asked this question in
Q&A
Replies: 2 comments 4 replies
-
如果host为空的时候,改为匹配不到任何,而不是能匹配任何 可行吗? |
Beta Was this translation helpful? Give feedback.
3 replies
-
同样遇到这个问题,有两条路由:
结果想访问1的path都请求到了路由2上。 文档中也没找到关于设置host与不设置host的匹配优先级说明啊 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
简化来说我们有两条路由规则,两个域名的根路径转发到了各自的业务,并且各自加了域名匹配
然后修改第一条路由的时候,不小心把Host规则删掉了,变成了
这个时候路由1的优先级比路由2高,导致了原本想走 www.test2.com的路由全都转到了 路由1。
总结下,同一个apisix肯定会维护多个域名转发,每个域名大概率也会有一个/路由转给静态资源,不管怎么配置,一旦把优先级高的跟路由的域名规则不小心删除,就会覆盖所有的其他跟路由,感觉这个有一定的风险,不知道大家有没有遇到类似的问题,有没有什么好的规避方案?
Beta Was this translation helpful? Give feedback.
All reactions