Enable CORS for /health endpoint in Spring Boot Actuator : <p>We want to enable Cors for all GET requests to the <code>/health</code> endpoint provided by spring boot actuator.</p>

<p>We tried adding the following bean without success</p>

<pre><code>@Bean
public WebMvcConfigurer corsConfigurer() {
    return new WebMvcConfigurerAdapter() {
        @Override
        public void addCorsMappings(CorsRegistry registry) {
            registry.addMapping("/health").allowedMethods("GET");
        }
    };
}
</code></pre>
