title: if condition in nginx proxy_pass
body: <p>I am trying to route a different upstream based on the version coming from the "customerlocale" header from the client, but the below config is not working. Please give me an idea on how to solve this issue.</p>
  
  <pre><code>server {
      listen 80 default;
  
      location / {
  
          if ($http_customerlocale = en) {
              proxy_pass http://upstream-en;
          }
  
          if ($http_customerlocale = de) {
              proxy_pass http://upstream-de;
          }
      }
  }
  </code></pre>