From b9a275b0d5ce5120a64fecb1899889119af905e4 Mon Sep 17 00:00:00 2001 From: ptrcnull Date: Thu, 21 Dec 2023 22:38:34 +0100 Subject: [PATCH] fix: don't redirect on missing with 301 closes #1 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 4f804d9..f0af4c2 100644 --- a/main.go +++ b/main.go @@ -137,7 +137,7 @@ func (h *Handler) RedirectHandler(wr http.ResponseWriter, req *http.Request) { log.Println("hits query error:", err) } wr.Header().Set("Location", "/") - wr.WriteHeader(http.StatusMovedPermanently) + wr.WriteHeader(http.StatusFound) return }