Use requestMatchers

Closes gh-96
This commit is contained in:
Marcus Da Coregio
2022-10-07 15:35:14 -03:00
parent 92e7c69e19
commit 456419bff0
13 changed files with 24 additions and 24 deletions

View File

@@ -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()