count redirects
1 file changed, 1 insertion(+), 0 deletions(-)
jump to
M internal/website/mux.go → internal/website/mux.go
@@ -44,6 +44,7 @@ func (website *Website) ServeHTTP(w http.ResponseWriter, r *http.Request) *ihttp.Error { urlPath, shouldRedirect := website.reader.CanonicalisePath(r.URL.Path) if shouldRedirect { + website.counter.Count(r, "302") http.Redirect(w, r, urlPath, 302) return nil