fix: don't redirect on missing with 301

closes #1
This commit is contained in:
ptrcnull 2023-12-21 22:38:34 +01:00
parent 4394883200
commit b9a275b0d5
Signed by: ptrcnull
GPG key ID: 411F7B30801DD9CA

View file

@ -137,7 +137,7 @@ func (h *Handler) RedirectHandler(wr http.ResponseWriter, req *http.Request) {
log.Println("hits query error:", err) log.Println("hits query error:", err)
} }
wr.Header().Set("Location", "/") wr.Header().Set("Location", "/")
wr.WriteHeader(http.StatusMovedPermanently) wr.WriteHeader(http.StatusFound)
return return
} }