From afecd90a6ca1551057631d21d940af86385ac535 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 5 May 2020 14:39:39 -0400 Subject: [PATCH] reverseproxy: Add tls_server_name option to Caddyfile (#3322) --- modules/caddyhttp/reverseproxy/caddyfile.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go index 56e2698e..e1c9724c 100644 --- a/modules/caddyhttp/reverseproxy/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/caddyfile.go @@ -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()