Merge pull request #1787 from domgoer/master

better wording
pull/1801/head
Ben Kochie 2020-07-14 14:32:19 +02:00 committed by GitHub
commit f4b89c79a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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. // 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 { func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error {
if tlsConfigPath == "" { 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() return server.ListenAndServe()
} }
@ -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)) server.TLSNextProto = make(map[string]func(*http.Server, *tls.Conn, http.Handler))
} }
// Valid TLS config. // 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: case errNoTLSConfig:
// No TLS config, back to plain HTTP. // 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() return server.ListenAndServe()
default: default:
// Invalid TLS config. // Invalid TLS config.