From 1403e95a1b91f1a367f755984d82495f6bfae8d5 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Wed, 2 Sep 2026 17:32:11 -0700 Subject: Tweak redirect codes --- roseh.moe.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'roseh.moe.go') diff --git a/roseh.moe.go b/roseh.moe.go index a6224cf..bfd5b97 100644 --- a/roseh.moe.go +++ b/roseh.moe.go @@ -765,7 +765,7 @@ type loginTemplateArgs struct { func redirectLogin(w http.ResponseWriter, r *http.Request, redirect string) { redirect += base64.RawURLEncoding.EncodeToString(mac([]byte(redirect), "redirect")) - http.Redirect(w, r, *selfURL+"/login?redirect="+url.QueryEscape(redirect), http.StatusFound) + http.Redirect(w, r, *selfURL+"/login?redirect="+url.QueryEscape(redirect), http.StatusSeeOther) } func serveLogin(w http.ResponseWriter, r *http.Request) { @@ -851,7 +851,7 @@ func cmd(w http.ResponseWriter, r *http.Request) { if r.FormValue("go-get") == "1" { fmt.Fprintf(w, ``, r.PathValue("cmd"), serviceConfig.CommandRedirects[sourceIdx].URL) } else { - http.Redirect(w, r, "https://pkg.go.dev/roseh.moe/cmd/"+r.PathValue("cmd"), http.StatusFound) + http.Redirect(w, r, "https://pkg.go.dev/roseh.moe/cmd/"+r.PathValue("cmd"), http.StatusMovedPermanently) } } @@ -914,7 +914,7 @@ func pkg(w http.ResponseWriter, r *http.Request) { if r.FormValue("go-get") == "1" { fmt.Fprintf(w, ``, r.PathValue("pkg"), serviceConfig.PackageRedirects[sourceIdx].URL) } else { - http.Redirect(w, r, "https://pkg.go.dev/roseh.moe/pkg/"+r.PathValue("pkg"), http.StatusFound) + http.Redirect(w, r, "https://pkg.go.dev/roseh.moe/pkg/"+r.PathValue("pkg"), http.StatusMovedPermanently) } } -- cgit v1.3.1