config: deprecate remote http configuration (#1849)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2025-01-21 08:59:08 +01:00
committed by GitHub
parent 40a42ca457
commit 608b83cfd8
2 changed files with 9 additions and 4 deletions

View File

@@ -42,10 +42,14 @@ type Resolver struct {
func NewResolver(ctx context.Context, file string, logger *slog.Logger, insecureSkipVerify bool) (*Resolver, error) {
flags := map[string]string{}
var fileBytes []byte
var (
err error
fileBytes []byte
)
var err error
if strings.HasPrefix(file, "http://") || strings.HasPrefix(file, "https://") {
logger.WarnContext(ctx, "Loading configuration file from URL is deprecated and will be removed in 0.31.0. Use a local file instead.")
fileBytes, err = readFromURL(ctx, file, logger, insecureSkipVerify)
if err != nil {
return nil, err