Fix printing HTTPS address

This commit is contained in:
Andrey Meshkov 2019-02-22 18:47:54 +03:00
parent 1da954fa97
commit a04923a4f3
1 changed files with 8 additions and 1 deletions

9
app.go
View File

@ -399,7 +399,14 @@ func loadOptions() options {
// proto is either "http" or "https"
func printHTTPAddresses(proto string) {
var address string
if config.BindHost == "0.0.0.0" {
if proto == "https" && config.TLS.ServerName != "" {
if config.TLS.PortHTTPS == 443 {
log.Printf("Go to https://%s", config.TLS.ServerName)
} else {
log.Printf("Go to https://%s:%d", config.TLS.ServerName, config.TLS.PortHTTPS)
}
} else if config.BindHost == "0.0.0.0" {
log.Println("AdGuard Home is available on the following addresses:")
ifaces, err := getValidNetInterfacesForWeb()
if err != nil {