You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The documentation WRT GlobalFilter and ordering suggests that GlobalFilter and GatewayFilter order can be controls via the Ordered interface (or @ordered annotation). However, it appears that regardless of the GlobalFilter order, the GatewayFilters are applied first. This should be clarified in the documentation or (preferably) fixed so that a GlobalFilter with a higher precedence than a GatewayFilter will be applied first.
From: https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/global-filters.html
"When a request matches a route, the filtering web handler adds all instances of GlobalFilter and all route-specific instances of GatewayFilter to a filter chain. This combined filter chain is sorted by the org.springframework.core.Ordered interface, which you can set by implementing the getOrder() method."
This is what I BELIEVE is the distinction. In each set (global vs non-global) order is respected. However relative the other opposite set, non-global are applied before global regardless of relative order. Also 2934 is in reference to the Order annotation vs Ordered interface. I believe I tried both. That said, I am using 3.1.9 so possible 2934 might address it.
Describe the bug
The documentation WRT GlobalFilter and ordering suggests that GlobalFilter and GatewayFilter order can be controls via the Ordered interface (or @ordered annotation). However, it appears that regardless of the GlobalFilter order, the GatewayFilters are applied first. This should be clarified in the documentation or (preferably) fixed so that a GlobalFilter with a higher precedence than a GatewayFilter will be applied first.
From: https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/global-filters.html
"When a request matches a route, the filtering web handler adds all instances of GlobalFilter and all route-specific instances of GatewayFilter to a filter chain. This combined filter chain is sorted by the org.springframework.core.Ordered interface, which you can set by implementing the getOrder() method."
This comment is what clued me in:
#2784 (comment)
The text was updated successfully, but these errors were encountered: