'/health' endpoint does not support CORS

Hi

I enabled /health endpoint.
It works with curl, but when I’m trying to check this status in my frontend application, I’m receiving an error:

Access to fetch at 'http://localhost:8080/health' from origin 'http://localhost:4000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How can I configure CORS for this endpoint?