From 68854af8d7ab6a82e6b352e7e1ccae24fed883f2 Mon Sep 17 00:00:00 2001 From: zyxkad Date: Tue, 5 Mar 2024 08:57:24 -0700 Subject: [PATCH] add a debug log for redirect --- handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler.go b/handler.go index 902b2008..e3e5b00f 100644 --- a/handler.go +++ b/handler.go @@ -186,6 +186,9 @@ func (cr *Cluster) GetHandler() http.Handler { u := *req.URL u.Scheme = "https" u.Host = net.JoinHostPort(host, strconv.Itoa((int)(cr.publicPort))) + + logDebugf("Redirecting from %s to %s", req.Host, u.String()) + rw.Header().Set("Location", u.String()) rw.Header().Set("Content-Length", "0") rw.WriteHeader(http.StatusFound)