Health check with cors enabled

I set the health check path to /api/v1/health

https://nhat-ha-staging.onrender.com/api/v1/health

This path is already excluded from cors (you can check the above link)

Not sure why the health check path is shown as nhat-ha-staging.onrender.com:10000/api/v1/health

and you can see it shows failed response (due to cors). However, the build was still Live, as if the check passed.

=> I’m confused, is Health check working as intended?

Hi @alfienguyen,

I’ve responded to you privately, but will post here to close the loop as well. Apologies if the health check URL listed in the dashboard is confusing - the health check is not run on the external URL, but rather the address accessible by the internal-hostname:port. We’re working on making this more clear in the dashboard.

The health check just needs to respond with a 200 status in order for the service to be marked live - which I see that your endpoint is responding with, despite the error you’re seeing in the logs.

Hi @Jade_Paoletta

Thanks for the follow-up. However, I’ve tried a random path (/randomxyz) for health check and the build still passed: https://nhat-ha-staging.onrender.com/randomxyz

Not sure if health check is working properly in my case.

@alfienguyen,

Thanks for the additional details. After some further testing, it does look like this is a bug, specifically with the free plan. We’ll be filing a bug report around this to fix it!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.