Use requestMatchers
Closes gh-96
This commit is contained in:
@@ -35,8 +35,8 @@ class SecurityConfig {
|
||||
@Bean
|
||||
fun filterChain(http: HttpSecurity): SecurityFilterChain {
|
||||
http.authorizeRequests()
|
||||
.antMatchers("/css/**").permitAll()
|
||||
.antMatchers("/user/**").hasAuthority("ROLE_USER")
|
||||
.requestMatchers("/css/**").permitAll()
|
||||
.requestMatchers("/user/**").hasAuthority("ROLE_USER")
|
||||
.and()
|
||||
.formLogin().loginPage("/log-in")
|
||||
return http.build()
|
||||
|
||||
Reference in New Issue
Block a user