Handling OPTIONS request in nginx

前端 未结 2 1199
走了就别回头了
走了就别回头了 2020-12-08 13:58

We\'re using HAProxy as a load balancer at the moment, and it regularly makes requests to the downstream boxes to make sure they\'re alive using an OPTIONS request:

2条回答
  •  粉色の甜心
    2020-12-08 14:59

    In the httpchk option, you can specify the HTTP method like this:

    httpchk GET http://example.com/check.php
    

    You can also use POST, or a plain URI like /. I have it check PHP, since PHP runs external to Nginx.

提交回复
热议问题