Skip to content

Commit

Permalink
metrics not showing up #191
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcGiffing committed Nov 28, 2023
1 parent 79f4a21 commit 43f5a4b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ public class SecurityConfig {

@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests().requestMatchers("/unsecure").permitAll();
http.authorizeHttpRequests().requestMatchers("/login").permitAll();
http.authorizeHttpRequests().requestMatchers("/secure").hasAnyRole("ADMIN", "USER");
http.authorizeHttpRequests(auth -> {
auth.requestMatchers("/unsecure").permitAll();
auth.requestMatchers("/actuator/*").permitAll();
auth.requestMatchers("/login").permitAll();
auth.requestMatchers("/secure").hasAnyRole("ADMIN", "USER");
});
return http.build();
}

@Bean
public UserDetailsService inMemoryUser() throws Exception {
public UserDetailsService inMemoryUser() {
UserDetails user = User.builder()
.username("admin")
.password("123")
Expand Down

0 comments on commit 43f5a4b

Please sign in to comment.