title: How to proxy http_x_ssl_client_s_dn header?
body: <p>I want to proxy the request header 'HTTP_X_SSL_CLIENT_S_DN' through nginx.</p>
  
  <p>Here is our server network structure.</p>
  
  <pre><code>[front server:443] &lt;---&gt; [nginx proxy:8004] &lt;---&gt; [application server:8008]
  (client cert auth)
  </code></pre>
  
  <p>When I tried it two servers([front server] and [application server]), it worked properly. The header 'HTTP_X_SSL_CLIENT_S_DN' was passed to application server.</p>
  
  <p>Then adding the server [nginx proxy], the header 'HTTP_X_SSL_CLIENT_S_DN' was not passed to application server.</p>
  
  <p>My nginx config is below.</p>
  
  <pre><code>server {
      listen   8004;
      index index.html;
  
      location / {
          proxy_pass_header Server;
          proxy_pass_header X-Scheme;
          proxy_set_header Host $http_host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_pass http://app-server/;
  
  # TODO: to proxy 'HTTP_X_SSL_CLIENT_S_DN'
  # failed settings
  #        proxy_pass_request_headers on; # not worked (default: on)
  #        proxy_pass_header X-SSL-Client-S-DN; # none
  #        proxy_pass_header X_SSL_CLIENT_S_DN; # none
  #        proxy_pass_header HTTP_X_SSL_CLIENT_S_DN; # none
  #        proxy_pass_header HTTP-X-SSL-CLIENT-S-DN; # none
  #        proxy_set_header X-SSL-Client-S-DN $ssl_client_s_dn; # none
  #        proxy_set_header X_SSL_Client_S_DN $x_ssl_client_s_dn; # none
  #        proxy_set_header X-SSL-Client-S-DN $http_ssl_client_s_dn; # none
  #        proxy_set_header X-SSL-Client-S-DN $http_x_ssl_client_s_dn; # none
      }
  }
  
  upstream app-server {
      server 127.0.0.1:8008;
  }
  </code></pre>
  
  <p>Any help appliciated.</p>