Skip to content

Instantly share code, notes, and snippets.

@v0112358
Created January 6, 2014 07:23
Show Gist options
  • Save v0112358/8279382 to your computer and use it in GitHub Desktop.
Save v0112358/8279382 to your computer and use it in GitHub Desktop.
Nginx multiple if statements
if ($uri = /) {
set $varnc A;
}
if ($http_cache_control ~ "max-age=0") {
set $varnc "${varnc}B";
}
if ($varnc = AB) {
set $not_cache_rq 1;
set $not_cache_rp 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment