Welcome! Log In Create A New Profile

Advanced

proxy_ssl_session_reuse not working with dynamic proxy_pass

January 25, 2019 10:21AM
Hi,

I'm trying to enable the proxy_ssl_session_reuse with dynamic proxy_pass as per the following config.
---
server {
listen 80;
server_name localhost;

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 4h;
proxy_ssl_session_reuse on;
proxy_ssl_protocols TLSv1.2;
proxy_ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
proxy_ssl_server_name on;
proxy_socket_keepalive on;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

set $upstream_server https://myupstream.com;
location /test/ {
# forward the request id received in the headers to the upstream
proxy_set_header X-Request-Id $http_x_request_id;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host "myupstream.com";

resolver 8.8.8.8;
rewrite ^/test/(.*) /$1 break;
proxy_pass $upstream_server;

# completely disable proxy cache
expires off;
sendfile off;

}

}
---

but the proxy module does not honor proxy_ssl_session_reuse.

Instead if in the case of NOT DYNAMIC resolution it works fine. Example:
---
server {
listen 80;
server_name localhost;

ssl_session_cache shared:SSL:20m;
ssl_session_timeout 4h;
proxy_ssl_session_reuse on;
proxy_ssl_protocols TLSv1.2;
proxy_ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
proxy_ssl_server_name on;
proxy_socket_keepalive on;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

location /test/ {
# forward the request id received in the headers to the upstream
proxy_set_header X-Request-Id $http_x_request_id;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host "myupstream.com";

resolver 8.8.8.8;
rewrite ^/test/(.*) /$1 break;
proxy_pass https://myupstream.com;

# completely disable proxy cache
expires off;
sendfile off;

}

}
---


Does anybody have any idea how (if possible) to make the proxy_ssl_session_reuse work with dynamic resolution?

Thanks
Peppe
Subject Author Posted

proxy_ssl_session_reuse not working with dynamic proxy_pass

gchiesa January 25, 2019 10:21AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready