Skip to content

Commit d19ff12

Browse files
committed
Publish CsrfTokenRepository as shared object
Closes gh-9595
1 parent e807fae commit d19ff12

File tree

1 file changed

+1
-0
lines changed
  • config/src/main/java/org/springframework/security/config/annotation/web/configurers

1 file changed

+1
-0
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public CsrfConfigurer<H> sessionAuthenticationStrategy(
201201
@SuppressWarnings("unchecked")
202202
@Override
203203
public void configure(H http) {
204+
http.setSharedObject(CsrfTokenRepository.class, this.csrfTokenRepository);
204205
CsrfFilter filter = new CsrfFilter(this.csrfTokenRepository);
205206
RequestMatcher requireCsrfProtectionMatcher = getRequireCsrfProtectionMatcher();
206207
if (requireCsrfProtectionMatcher != null) {

0 commit comments

Comments
 (0)