If is Evil… when used in location context | NGINX

The NGINX "if" directive is evil. If you need to use it, make sure you actually understand how it works first. You've been warned.