diff options
author | Francis Lavoie <lavofr@gmail.com> | 2020-05-05 14:39:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 12:39:39 -0600 |
commit | afecd90a6ca1551057631d21d940af86385ac535 (patch) | |
tree | 427894941b63276a78c68a7d797f13bf1b8e318a | |
parent | 2f59467ac3b8f31b0f2ad9af346bb52a045a3db2 (diff) |
reverseproxy: Add tls_server_name option to Caddyfile (#3322)
-rw-r--r-- | modules/caddyhttp/reverseproxy/caddyfile.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go index 56e2698..e1c9724 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() |