I have the following code that is working on Nginx to keep the AWS ELB healthcheck happy.
map $http_user_agent $ignore {
default 0;
"ELB-HealthChecker/1.0" 1;
}
server {
location / {
if ($ignore) {
access_log off;
return 200;
}
}
}
I know the 'IF' is best avoided with Nginx and I wanted to ask if someone would know how to recode this without the 'if'?
thankyou