title: how can I use AND operator in IF statement in nginx?
body: <p>I'm trying to cache the request based on the response header.
  Right now my desire condition is if the response has both 2 headers client-device and client-location, then the response should be cached on nginx side</p>
  
  <p>So I tried with this code</p>
  
  <pre><code>if ($http_client_device &amp;&amp; $http_clocation) {
      set $cache_key "$request_uri$http_client_device$http_client_location";
  }
  proxy_cache_key $cache_key;
  </code></pre>
  
  <p>but nginx doesn't allow that
      nginx: [emerg] unexpected "&amp;&amp;" in condition in...</p>
  
  <p>anyway to work around for this one?
  thanks in advance</p>