I want to proxy the request header 'HTTP_X_SSL_CLIENT_S_DN' through nginx.
Here is our server network structure.
[front server:443] <---> [nginx proxy:8004] <---> [application server:8008]
(client cert auth)
When I tried two servers ([front server] and [server application]), it worked correctly. The HTTP_X_SSL_CLIENT_S_DN header was passed to the application server.
Then, adding the [nginx proxy] server, the header 'HTTP_X_SSL_CLIENT_S_DN' was not passed to the application server.
Below is my nginx configuration.
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/;
}
}
upstream app-server {
server 127.0.0.1:8008;
}
Any help.
source
share