pass sni to http origins automatically
This commit is contained in:
parent
7a0a618c0d
commit
297e2d53c4
|
@ -376,6 +376,13 @@ func newHTTPTransport(service OriginService, cfg OriginRequestConfig, log *zerol
|
|||
return dialContext(ctx, "unix", service.path)
|
||||
}
|
||||
|
||||
// If this origin is a http service, configure the sni from the host header, if possible.
|
||||
case *httpService:
|
||||
if httpTransport.TLSClientConfig.ServerName == "" && service.hostHeader != "" {
|
||||
httpTransport.TLSClientConfig.ServerName = service.hostHeader
|
||||
}
|
||||
httpTransport.DialContext = dialContext
|
||||
|
||||
// Otherwise, use the regular network config.
|
||||
default:
|
||||
httpTransport.DialContext = dialContext
|
||||
|
|
Loading…
Reference in New Issue