aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorMohammed Al Sahaf <[email protected]>2024-04-27 22:51:00 +0300
committerGitHub <[email protected]>2024-04-27 15:51:00 -0400
commit87c7127c286982fb302bf88cc1689fafacba12fb (patch)
tree899ae3048a64e8c70eb0054052dcf76f009d937a /modules
parent2fc620d38dd8ac0e9e8512f25a760da62c050c2d (diff)
downloadcaddy-87c7127c286982fb302bf88cc1689fafacba12fb.tar.gz
caddy-87c7127c286982fb302bf88cc1689fafacba12fb.zip
chore: add warn logs when using deprecated fields (#6276)
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/reverseproxy/caddyfile.go1
-rw-r--r--modules/caddytls/connpolicy.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/reverseproxy/caddyfile.go b/modules/caddyhttp/reverseproxy/caddyfile.go
index ef0eea396..3bc4de017 100644
--- a/modules/caddyhttp/reverseproxy/caddyfile.go
+++ b/modules/caddyhttp/reverseproxy/caddyfile.go
@@ -1112,6 +1112,7 @@ func (h *HTTPTransport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
h.TLS.HandshakeTimeout = caddy.Duration(dur)
case "tls_trusted_ca_certs":
+ caddy.Log().Warn("The 'tls_trusted_ca_certs' field is deprecated. Use the 'tls_trust_pool' field instead.")
args := d.RemainingArgs()
if len(args) == 0 {
return d.ArgErr()
diff --git a/modules/caddytls/connpolicy.go b/modules/caddytls/connpolicy.go
index 7edfa3ef0..8e1f2cb11 100644
--- a/modules/caddytls/connpolicy.go
+++ b/modules/caddytls/connpolicy.go
@@ -443,6 +443,7 @@ func (ca *ClientAuthentication) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
return d.ArgErr()
}
case "trusted_ca_cert":
+ caddy.Log().Warn("The 'trusted_ca_cert' field is deprecated. Use the 'trust_pool' field instead.")
if len(ca.CARaw) != 0 {
return d.Err("cannot specify both 'trust_pool' and 'trusted_ca_cert' or 'trusted_ca_cert_file'")
}
@@ -456,6 +457,7 @@ func (ca *ClientAuthentication) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
}
ca.TrustedLeafCerts = append(ca.TrustedLeafCerts, d.Val())
case "trusted_ca_cert_file":
+ caddy.Log().Warn("The 'trusted_ca_cert_file' field is deprecated. Use the 'trust_pool' field instead.")
if len(ca.CARaw) != 0 {
return d.Err("cannot specify both 'trust_pool' and 'trusted_ca_cert' or 'trusted_ca_cert_file'")
}