I can't nest if and I don't have an and operator to use with if, so how would i un-nest this:
if ($AUTHENTICATED) {
proxy_pass http://backend;
{
if (!$AUTHENTICATED) {
if ($args ~ out=xml) {
rewrite (.*)$ $1.xml break;
}
if ($args ~ out=csv) {
rewrite (.*)$ $1.csv break;
}
}
but, please note: http://wiki.nginx.org/IfIsEvil