reverseproxy: Add tls_server_name option to Caddyfile (#3322)

This commit is contained in:
Francis Lavoie 2020-05-05 14:39:39 -04:00 committed by GitHub
parent 2f59467ac3
commit afecd90a6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -670,6 +670,16 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
h.TLS.RootCAPEMFiles = args
case "tls_server_name":
if !d.NextArg() {
return d.ArgErr()
}
if h.TLS == nil {
h.TLS = new(TLSConfig)
}
h.TLS.ServerName = d.Val()
case "keepalive":
if !d.NextArg() {
return d.ArgErr()