/ nginx / docs / nginx-constraints


Constraints of NGINX if block

If is EVIL

The only 100% safe things which may be done inside if in a location context are:

return …; rewrite … last;

and set variables value - like set $allow "${allow}n";

Other constraints

No multiple operators

Why should you need to use if even if it is considered evil?