http://www.ityouknow.com/springcloud/2019/01/26/spring-cloud-gateway-limit.html
-
//代表 截取路径的个数,spring: cloud: gateway: routes: - id: nameRoot uri: http://nameservice predicates: - Path=/name/** filters: - StripPrefix=2
- 这样配置后当请求
/name/bar/foo
后端匹配到的请求路径就会变成http://nameservice/foo
。
- 这样配置后当请求
来源:oschina
链接:https://my.oschina.net/u/3847203/blog/4469494