Browse Source

Uses MvcUtils.setRouteId() rather than set attr by hand.

See gh-2949
pull/3006/head
sgibb 2 years ago
parent
commit
9f39a02b6b
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 2
      spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/filter/BeforeFilterFunctions.java

2
spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/filter/BeforeFilterFunctions.java

@ -314,7 +314,7 @@ public abstract class BeforeFilterFunctions { @@ -314,7 +314,7 @@ public abstract class BeforeFilterFunctions {
public static Function<ServerRequest, ServerRequest> routeId(String routeId) {
return request -> {
request.attributes().put(MvcUtils.GATEWAY_ROUTE_ID_ATTR, routeId);
MvcUtils.setRouteId(request, routeId);
return request;
};
}

Loading…
Cancel
Save