debug: explain URLIsNoise choice in ping callback

The /debug/ping callback hits /machine/ping-response on the main
TLS router, not the noise chain, so URLIsNoise stays false. Document
this at the emit site to prevent accidental changes.

Updates #3157
This commit is contained in:
Kristoffer Dalby
2026-04-17 05:52:00 +00:00
parent 842f36225e
commit 93e8c7285f

View File

@@ -540,6 +540,9 @@ func (h *Headscale) doPing(ctx context.Context, query string) *templates.PingRes
pingID, responseCh := h.state.RegisterPing(nodeID)
defer h.state.CancelPing(pingID)
// The callback hits /machine/ping-response on the main TLS router,
// not the noise chain, so URLIsNoise stays false. Operators running
// server_url over plain HTTP are on their own — don't do that.
callbackURL := h.cfg.ServerURL + "/machine/ping-response?id=" + pingID
h.Change(change.PingNode(nodeID, &tailcfg.PingRequest{
URL: callbackURL,