mirror of
https://github.com/juanfont/headscale
synced 2026-04-25 17:15:33 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user