This is a nginx configuration
server {
listen $PORT;
location ~ ^/documents/(.*)$ {
proxy_pass http://127.0.0.1:5000/$1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location = /favicon.ico {
return 204;
access_log off;
log_not_found off;
}
}
There are two use cases of the url /documents/
:
POST to /documents/
for some processing or
GET to /documents/ping
used by AWS ELB as health check
In cloudwatch log I got heap of pings entries as a result
What is the easiest way to ask nginx not to log the ping?