title: How to set content-type in proxy_pass?
body: <p>On a website traffic is flowing in via http for location /instance we need the traffic to be secure using SSL and https. When redirecting to https, the request content-type is "text/xml" when it actually should be "application/json". Should we explicitly set something in the proxy header to "application/json"? We have tried add_header Content-type "application/json" in the http configuration and that didn't make a difference. What are we doing wrong?</p>
  
  <p>Http configuration:</p>
  
  <pre><code>location /instance {
  proxy_pass https://instancehost:9443/instance;
  proxy_redirect http://localhost.com https://localhost.com;
  proxy_set_header X-xmgr-proxy-domain http://localhost.com:80;
  proxy_set_header X-xmgr-proxy /instance;
  proxy_set_header Access-Control-Allow-Origin "*";
  proxy_set_header Access-Control-Allow-Headers "Origin, X-Requested-With,       Content-Type, Accept";
  proxy_ssl_certificate /data/nginx/certs/abc.crt;
  proxy_ssl_certificate_key /data/nginx/certs/abc.key;
  proxy_ssl_trusted_certificate /etc/pki/tls/certs/abc-bundle.crt;
  proxy_ssl_protocols SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  proxy_hide_header Content-Type;
  add_header Content-type "application/json"
  }
  </code></pre>
  
  <p>Setting the content-type in the header did not work as we are still receiving a 204 error.</p>
  
  <p>https configuration:</p>
  
  <pre><code>location /instance {
  proxy_pass           https://instancehost.com:9443/instance;
  proxy_set_header     X-xmgr-proxy-domain https://localhost.com:443;
  proxy_set_header     X-xmgr-proxy /instance;
  proxy_set_header     Access-Control-Allow-Origin "*";
  proxy_set_header     Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
  proxy_ssl_certificate /data/nginx/certs/abc.crt;
  proxy_ssl_certificate_key /data/nginx/certs/abc.key;
  
  }
  </code></pre>