mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Use explicit matchers following Spring Security 6.0.5 upgrade
See gh-36293
This commit is contained in:
parent
0233178855
commit
9d91dbc4e5
@ -66,8 +66,8 @@ public class SecurityConfiguration {
|
|||||||
requests.requestMatchers(EndpointRequest.toAnyEndpoint().excluding(MappingsEndpoint.class))
|
requests.requestMatchers(EndpointRequest.toAnyEndpoint().excluding(MappingsEndpoint.class))
|
||||||
.hasRole("ACTUATOR");
|
.hasRole("ACTUATOR");
|
||||||
requests.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll();
|
requests.requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll();
|
||||||
requests.requestMatchers("/foo").permitAll();
|
requests.requestMatchers(new AntPathRequestMatcher("/foo")).permitAll();
|
||||||
requests.requestMatchers(new AntPathRequestMatcher("/error")).permitAll();
|
requests.requestMatchers(new MvcRequestMatcher(handlerMappingIntrospector, "/error")).permitAll();
|
||||||
requests.requestMatchers(new AntPathRequestMatcher("/**")).hasRole("USER");
|
requests.requestMatchers(new AntPathRequestMatcher("/**")).hasRole("USER");
|
||||||
});
|
});
|
||||||
http.cors(Customizer.withDefaults());
|
http.cors(Customizer.withDefaults());
|
||||||
|
Loading…
Reference in New Issue
Block a user