summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2026-09-02 17:32:11 -0700
committerRose Hogenson <rosehogenson@posteo.net>2026-09-02 17:32:43 -0700
commit1403e95a1b91f1a367f755984d82495f6bfae8d5 (patch)
tree4e7c4f9c678fc4b914f877de49f253ef068e408c
parentAdd some more entries in .gitignore (diff)
downloadroseh.moe-1403e95a1b91f1a367f755984d82495f6bfae8d5.tar.zst
Tweak redirect codes
-rw-r--r--roseh.moe.go6
1 files changed, 3 insertions, 3 deletions
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, `<meta name="go-import" content="roseh.moe/cmd/%s %s">`, 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, `<meta name="go-import" content="roseh.moe/pkg/%s %s">`, 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)
}
}