Skip to content

Instantly share code, notes, and snippets.

@giasraya
Forked from joseluisq/nginx.conf
Last active February 21, 2020 10:18
Show Gist options
  • Save giasraya/c4376e8484693750f3a528284c9487cd to your computer and use it in GitHub Desktop.
Save giasraya/c4376e8484693750f3a528284c9487cd to your computer and use it in GitHub Desktop.
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
}
if ($test = ABC) {
proxy_pass http://teambox-cms.heroku.com;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment