package com.cameleer.server.app.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;

@Component
public class ServerCapabilitiesHealthIndicator implements HealthIndicator {

    @Value("${cameleer.server.security.infrastructureendpoints:true}")
    private boolean infrastructureEndpoints;

    @Override
    public Health health() {
        return Health.up()
                .withDetail("infrastructureEndpoints", infrastructureEndpoints)
                .build();
    }
}
