Quantcast
Channel: User jrwren - Server Fault
Viewing all articles
Browse latest Browse all 14

How do I rewrite args with nginx if and only if a variable is set?

$
0
0

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;    } }

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>