'Nginx Health Check - Post Endpoint

Is it possible for to configure NGINX such that the healthcheck calls a post endpoint on a server and match the response?

For example, I'd like to do a healthcheck using an existing post endpoint in a node - this would mean having to set a RequestBody in order to allow the check.

My options now are to expose an endpoint that does that for me and just go through that, but I am not completely sure if that's the most optimal way.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source