﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
229	proxy_pass should be able to set SNI hostname	Jakob Praher	somebody	"if the upstream source is a virtual host using ssl and selects the destintation based on SNI, the upstream cannot process the request properly when served using nginx.

Here is an example that does not pass the SNI from the client to the upstream target.

    location / {
        resolver                127.0.0.1;
        proxy_pass              https://$host;
        proxy_redirect          off;
        proxy_set_header        Host    $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X_FORWARDED_PROTO https;
     }

Attached you find my try to fix the problem which works for me, but is not configurable through variables yet. Furtheremore it directly calls the SSL_set_tlsext_host_name in the upstream library, due to difficulties how to obtain the host name: the patch uses ngx_http_upstream_t.resolved.host. 


"	enhancement	closed	minor		nginx-module	1.3.x	fixed	SSL SNI proxy_pass virtual host			trunk
