fix(security): permit /actuator/health without authentication
The CI health check (curl -sf) and Docker Compose health check (wget) both hit /actuator/health unauthenticated. With anyRequest().authenticated() the endpoint returned 401, curl -f treated it as failure, and the health check loop never exited successfully. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,8 @@ public class SecurityConfig {
|
||||
.csrf(csrf -> csrf.disable())
|
||||
|
||||
.authorizeHttpRequests(auth -> {
|
||||
// Health endpoint must be open so CI/Docker health checks work without credentials
|
||||
auth.requestMatchers("/actuator/health").permitAll();
|
||||
// In dev, allow unauthenticated access to the OpenAPI spec and Swagger UI
|
||||
if (environment.matchesProfiles("dev")) {
|
||||
auth.requestMatchers(
|
||||
|
||||
Reference in New Issue
Block a user