don't use StatusMovedPermanently for admin redirections
This commit is contained in:
@@ -83,7 +83,7 @@ func setupMisc(r *mux.Router, ctrl *ctrlbase.Controller) {
|
|||||||
r.HandleFunc("/",
|
r.HandleFunc("/",
|
||||||
func(w http.ResponseWriter, r *http.Request) {
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
// make the admin page the default
|
// 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",
|
r.HandleFunc("/musicFolderSettings.view",
|
||||||
func(w http.ResponseWriter, r *http.Request) {
|
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()`.
|
// custom handler, middleware. etc setup that we've got in `SetupSubsonic()`.
|
||||||
// instead lets redirect to down there and use the scan endpoint
|
// instead lets redirect to down there and use the scan endpoint
|
||||||
redirectTo := fmt.Sprintf("/rest/startScan.view?%s", r.URL.Query().Encode())
|
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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user