diff --git a/ipn/ipnlocal/serve.go b/ipn/ipnlocal/serve.go index bc276bd55..5b9f1e943 100644 --- a/ipn/ipnlocal/serve.go +++ b/ipn/ipnlocal/serve.go @@ -484,7 +484,12 @@ func (b *LocalBackend) serveWebHandler(w http.ResponseWriter, r *http.Request) { http.Error(w, "unknown proxy destination", http.StatusInternalServerError) return } - p.(http.Handler).ServeHTTP(w, r) + h := p.(http.Handler) + // Trim the mount point from the URL path before proxying. (#6571) + if r.URL.Path != "/" { + h = http.StripPrefix(strings.TrimSuffix(mountPoint, "/"), h) + } + h.ServeHTTP(w, r) return }