Use method references when possible

See gh-40974
This commit is contained in:
Ahmed Ashour
2024-06-11 12:52:07 -07:00
committed by Phillip Webb
parent ef99ce0ba9
commit 507229eef8
7 changed files with 15 additions and 11 deletions

View File

@@ -23,6 +23,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.CsrfConfigurer;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
@@ -49,7 +50,7 @@ class RemoteDevtoolsSecurityConfiguration {
SecurityFilterChain devtoolsSecurityFilterChain(HttpSecurity http) throws Exception {
http.securityMatcher(new AntPathRequestMatcher(this.url));
http.authorizeHttpRequests((requests) -> requests.anyRequest().anonymous());
http.csrf((csrf) -> csrf.disable());
http.csrf(CsrfConfigurer::disable);
return http.build();
}