diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index 99d5fc3cce..b52b3fc849 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -456,7 +456,9 @@ public class ServerHttpSecurity { } protected void configure(ServerHttpSecurity http) { - http.addFilterAt(new ServerRequestCacheWebFilter(), SecurityWebFiltersOrder.SERVER_REQUEST_CACHE); + ServerRequestCacheWebFilter filter = new ServerRequestCacheWebFilter(); + filter.setRequestCache(this.requestCache); + http.addFilterAt(filter, SecurityWebFiltersOrder.SERVER_REQUEST_CACHE); } public ServerHttpSecurity and() {