Skip to content

Commit 80e8f9a

Browse files
Use ignoringRequestMatchers
Issue gh-96
1 parent 456419b commit 80e8f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

servlet/spring-boot/java/jwt/login/src/main/java/example/RestConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
6565
.authorizeHttpRequests((authorize) -> authorize
6666
.anyRequest().authenticated()
6767
)
68-
.csrf((csrf) -> csrf.ignoringAntMatchers("/token"))
68+
.csrf((csrf) -> csrf.ignoringRequestMatchers("/token"))
6969
.httpBasic(Customizer.withDefaults())
7070
.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
7171
.sessionManagement((session) -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))

0 commit comments

Comments
 (0)