Skip to content

Commit

Permalink
hotfix: spring security spring actuator permit all
Browse files Browse the repository at this point in the history
  • Loading branch information
jcw1031 committed Apr 2, 2024
1 parent 7869e94 commit 19ad455
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;

@Configuration
@EnableWebSecurity
Expand All @@ -28,7 +27,7 @@ public class SecurityConfiguration {
public SecurityFilterChain filterChain(HttpSecurity http)
throws Exception {
return http.authorizeHttpRequests(authorize -> authorize
.requestMatchers(new AntPathRequestMatcher("/api/**")).permitAll()
.requestMatchers("/api/**", "/actuator/health").permitAll()
.anyRequest().authenticated())
.formLogin(formLogin -> formLogin.loginPage("/admin/login")
.defaultSuccessUrl("/admin/messages")
Expand Down

0 comments on commit 19ad455

Please sign in to comment.