Skip to content

Commit 1cc0602

Browse files
authored
Remove open endpoint /actuator/health (#426)
By default, CAP Java provides the open endpoints `actuator/health/liveness` and `actuator/health/readiness`. Both can be used by Cf or K8s for application health checks. There is no need for a public `actuator/health` anymore. See also in mta.yaml: https://github.com/SAP-samples/cloud-cap-samples-java/blob/228e05f940b4d22acc7d88c862fcb6e8c085ff40/mta-multi-tenant.yaml#L18
1 parent 228e05f commit 1cc0602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

srv/src/main/java/my/bookshop/config/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class WebSecurityConfig {
1818

1919
@Bean
2020
public SecurityFilterChain configure(HttpSecurity http) throws Exception {
21-
return http.securityMatchers(s -> s.requestMatchers(antMatcher("/actuator/health"), antMatcher("/swagger/**"))) //
21+
return http.securityMatchers(s -> s.requestMatchers(antMatcher("/swagger/**"))) //
2222
.csrf(c -> c.disable()).authorizeHttpRequests(a -> a.anyRequest().permitAll())
2323
.build();
2424
}

0 commit comments

Comments
 (0)