Browse Source

Fix RequestCache

Issue: gh-4789
Rob Winch 7 years ago
parent
commit
0b1618d8b4

+ 3 - 1
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() {