SIGN IN SIGN UP

web: add TLSConfig.IsEnabled() method (#422)

Add an exported IsEnabled() method on TLSConfig that reports whether TLS
is configured, i.e. whether at least one TLS-related field is set. This
mirrors the existing check in validateTLSPaths, which is refactored to
call it, so behaviour is unchanged.

The method lets callers determine whether the server will serve HTTPS
without duplicating the field list or reading the certificate files from
disk (as ConfigToTLSConfig does). For example, Prometheus infers the
scheme of its external URL from the web config file, and previously had
to reimplement this check.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
G
George Krajcsovits committed
482b52b0f601277f55472196a8fdde9528898822
Parent: 2f56fe4
Committed by GitHub <noreply@github.com> on 7/23/2026, 6:15:46 AM