Enable TLS and use it

This commit is contained in:
Harshavardhana
2015-06-08 20:10:59 -07:00
parent dcc1609d2e
commit c6ecd94420
2 changed files with 13 additions and 17 deletions

View File

@@ -74,7 +74,6 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error,
}
}
}
switch {
default:
for _, host := range hosts {
@@ -82,7 +81,9 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error,
}
err = httpServer.ListenAndServe()
case config.TLS == true:
fmt.Printf("Starting minio server on: https://%s:%s\n", host, port)
for _, host := range hosts {
fmt.Printf("Starting minio server on: https://%s:%s\n", host, port)
}
httpServer.TLSConfig = getDefaultTLSConfig()
err = httpServer.ListenAndServeTLS(config.CertFile, config.KeyFile)
}