Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
caddytls: Support custom bind host for challenges (#3232)
Matthew Holt committed
Apr 6, 2020 at 11:22 UTC
6a32daa225dddacf2a87da089e1160a77ef69afb
2 files changed
+5
modules/caddytls/acmeissuer.go
+1
@@ -153,6 +153,7 @@ func (m *ACMEIssuer) makeIssuerTemplate() (certmagic.ACMEManager, error) {
153
template.AltTLSALPNPort = m.Challenges.TLSALPN.AlternatePort
154
}
155
template.DNSProvider = m.Challenges.DNS
156
+ template.ListenHost = m.Challenges.BindHost
157
}
158
159
return template, nil
modules/caddytls/automation.go
+4
@@ -239,6 +239,10 @@ type ChallengesConfig struct {
239
// to Caddy from an external server.
240
DNSRaw json.RawMessage `json:"dns,omitempty" caddy:"namespace=tls.dns inline_key=provider"`
241
242
+ // Optionally customize the host to which a listener
243
+ // is bound if required for solving a challenge.
244
+ BindHost string `json:"bind_host,omitempty"`
245
+
246
DNS challenge.Provider `json:"-"`
247
}
248