diff --git a/ipn/ipnlocal/serve.go b/ipn/ipnlocal/serve.go index 715aefede..41f62e48f 100644 --- a/ipn/ipnlocal/serve.go +++ b/ipn/ipnlocal/serve.go @@ -476,7 +476,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 }