diff --git a/tsweb/tsweb.go b/tsweb/tsweb.go index 9ddb3fad5..57ef243e7 100644 --- a/tsweb/tsweb.go +++ b/tsweb/tsweb.go @@ -146,8 +146,10 @@ type Port80Handler struct { } func (h Port80Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + ipStr, _, _ := net.SplitHostPort(r.RemoteAddr) + ip, _ := netip.ParseAddr(ipStr) path := r.RequestURI - if path == "/debug" || strings.HasPrefix(path, "/debug") { + if ip.IsLoopback() || path == "/debug" || strings.HasPrefix(path, "/debug") { h.Main.ServeHTTP(w, r) return }