From 1b67a2f960a29b0b0f02b04f8b57a97e0dbfd800 Mon Sep 17 00:00:00 2001 From: sentriz Date: Wed, 9 Dec 2020 14:35:15 +0000 Subject: [PATCH] don't use StatusMovedPermanently for admin redirections --- server/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 385e5eb..e720dce 100644 --- a/server/server.go +++ b/server/server.go @@ -83,7 +83,7 @@ func setupMisc(r *mux.Router, ctrl *ctrlbase.Controller) { r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { // make the admin page the default - http.Redirect(w, r, ctrl.Path("/admin/home"), http.StatusMovedPermanently) + http.Redirect(w, r, ctrl.Path("/admin/home"), http.StatusSeeOther) }) r.HandleFunc("/musicFolderSettings.view", func(w http.ResponseWriter, r *http.Request) { @@ -92,7 +92,7 @@ func setupMisc(r *mux.Router, ctrl *ctrlbase.Controller) { // custom handler, middleware. etc setup that we've got in `SetupSubsonic()`. // instead lets redirect to down there and use the scan endpoint redirectTo := fmt.Sprintf("/rest/startScan.view?%s", r.URL.Query().Encode()) - http.Redirect(w, r, ctrl.Path(redirectTo), http.StatusMovedPermanently) + http.Redirect(w, r, ctrl.Path(redirectTo), http.StatusSeeOther) }) }