mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 15:30:04 +00:00
TUN-4811: Publish quick tunnels' hostname in /metrics under userHostname
for backwards-compatibility
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -51,9 +52,14 @@ func RunQuickTunnel(sc *subcommandContext) error {
|
||||
TunnelName: data.Result.Name,
|
||||
}
|
||||
|
||||
url := data.Result.Hostname
|
||||
if !strings.HasPrefix(url, "https://") {
|
||||
url = "https://" + url
|
||||
}
|
||||
|
||||
for _, line := range connection.AsciiBox([]string{
|
||||
"Your Quick Tunnel has been created! Visit it at:",
|
||||
data.Result.Hostname,
|
||||
url,
|
||||
}, 2) {
|
||||
sc.log.Info().Msg(line)
|
||||
}
|
||||
|
Reference in New Issue
Block a user