0

Goal:

Allow access to clients whose User Agent is empty string or 'ELB-HealthChecker.*', the rest should be blocked.

I tried this code and it worked with nginx/1.2, but after the upgrade to nginx/1.2.3, it blocks everything:

if ($http_user_agent !~* ELB-HealthChecker|"") { return 403; }

Can someone help please?

1 Answer 1

1

This worked for me in 1.2.3:

    if ($http_user_agent !~* "(ELB-HealthChecker|^$)") { return 403; }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .