Skip to content

Commit

Permalink
better wording
Browse files Browse the repository at this point in the history
Signed-off-by: domgoer <[email protected]>
  • Loading branch information
domechn authored and oblitorum committed Apr 9, 2024
1 parent d2c89f8 commit 58d226c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions https/tls_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
// Listen starts the server on the given address. If tlsConfigPath isn't empty the server connection will be started using TLS.
func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error {
if tlsConfigPath == "" {
level.Info(logger).Log("msg", "TLS is disabled and it cannot be enabled on the fly.", "http2", false)
level.Info(logger).Log("msg", "TLS is disabled.", "http2", false)
return server.ListenAndServe()
}

Expand Down Expand Up @@ -197,10 +197,10 @@ func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error
server.TLSNextProto = make(map[string]func(*http.Server, *tls.Conn, http.Handler))
}
// Valid TLS config.
level.Info(logger).Log("msg", "TLS is enabled and it cannot be disabled on the fly.", "http2", c.HTTPConfig.HTTP2)
level.Info(logger).Log("msg", "TLS is enabled.", "http2", c.HTTPConfig.HTTP2)
case errNoTLSConfig:
// No TLS config, back to plain HTTP.
level.Info(logger).Log("msg", "TLS is disabled and it cannot be enabled on the fly.", "http2", false)
level.Info(logger).Log("msg", "TLS is disabled.", "http2", false)
return server.ListenAndServe()
default:
// Invalid TLS config.
Expand Down

0 comments on commit 58d226c

Please sign in to comment.