From 2f2a529e31f69400daa694039b4f4df007647702 Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 29 Oct 2024 08:52:37 -0400 Subject: [PATCH] InsecureConnection can be used in prod builds (#14992) * InsecureConnection can be used in prod builds * Update core/config/toml/types.go Co-authored-by: Jordan Krage --------- Co-authored-by: Jordan Krage --- core/config/toml/types.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 497e33d5ddd..5246f0861f5 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -1693,11 +1693,8 @@ func (b *Telemetry) ValidateConfig() (err error) { if b.Endpoint == nil || *b.Endpoint == "" { err = multierr.Append(err, configutils.ErrMissing{Name: "Endpoint", Msg: "must be set when Telemetry is enabled"}) } - if b.InsecureConnection != nil && *b.InsecureConnection { - if build.IsProd() { - err = multierr.Append(err, configutils.ErrInvalid{Name: "InsecureConnection", Value: true, Msg: "cannot be used in production builds"}) - } - } else { + if b.InsecureConnection == nil || !*b.InsecureConnection { + // InsecureConnection is set and false if b.CACertFile == nil || *b.CACertFile == "" { err = multierr.Append(err, configutils.ErrMissing{Name: "CACertFile", Msg: "must be set, unless InsecureConnection is used"}) }