MCPcopy
hub / github.com/cloudflare/cloudflared / SendURL

Method SendURL

connection/observer.go:78–87  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

76}
77
78func (o *Observer) SendURL(url string) {
79 o.sendEvent(Event{EventType: SetURL, URL: url})
80
81 if !strings.HasPrefix(url, "https://") {
82 // We add https:// in the prefix for backwards compatibility as we used to do that with the old free tunnels
83 // and some tools (like `wrangler tail`) are regexp-ing for that specifically.
84 url = "https://" + url
85 }
86 o.metrics.userHostnamesCounts.WithLabelValues(url).Inc()
87}
88
89func (o *Observer) SendReconnect(connIndex uint8) {
90 o.sendEvent(Event{Index: connIndex, EventType: Reconnecting})

Callers 2

TestSendUrlFunction · 0.95
StartServerFunction · 0.95

Calls 1

sendEventMethod · 0.95

Tested by 1

TestSendUrlFunction · 0.76