spring-cloud-gateway icon indicating copy to clipboard operation
spring-cloud-gateway copied to clipboard

WeightCalculatorWebFilter cause a wrong route

Open quyendqmz opened this issue 3 years ago • 0 comments

Describe the bug I created 2 routes use weight route predicate factory. After i remove one route and publish RefreshRoutesEvent, the route work not correctly, sometime it redirect to old route. As i checked, WeightCalculatorWebFilter still has old data in config.weights, that may be the reason.

Sample [ { predicate: "(Paths: [/redirect/dbsync/], match trailing slash: true && Weight: group 5)", route_id: "r1", filters: [ "[[RewritePath /redirect/dbsync/(?.*) = '/${segment}'], order = 0]" ], uri: "https://jsonplaceholder.typicode.com:443", order: 0 }, { predicate: "(Paths: [/redirect/dbsync/], match trailing slash: true && Weight: group 5)", route_id: "r2", filters: [ "[[RewritePath /redirect/dbsync/(?.*) = '/${segment}'], order = 0]" ], uri: "http://httpbin.org:80", order: 0 } ]

quyendqmz avatar May 30 '22 02:05 quyendqmz