title: Nginx string manipulation on a variable
body: <p>Is there a way i can apply string replace on a nginx variable. I am using nginx as a proxy for s3 restricted downloads. And i am forwarding the <code>$upstream_http_etag</code> to the response header with the different name.</p>
  
  <pre><code>add_header Content-MD5 $upstream_http_etag;
  proxy_set_header Content-MD5 $upstream_http_etag;
  </code></pre>
  
  <p>The problem is etag is <code>double quoted</code>. I wanted to remove this double quotes before adding it to the header. Is there a possible way to do this.</p>
  
  <p>I know i can strip it down on the client. But this is for older apps to work without the updates.</p>
  
  <p>Any help is much appreciated.</p>