feat: use see other status to redirect to login page

This commit is contained in:
wpetit 2025-02-23 14:41:55 +01:00
parent 65f9f2ef15
commit 59c9737ae2

View File

@ -178,7 +178,7 @@ func (h *Handler) handleIssueForm(w http.ResponseWriter, r *http.Request) {
func (h *Handler) handleError(w http.ResponseWriter, r *http.Request, err error) {
if errors.Is(err, service.ErrForgeNotAvailable) {
baseURL := url.Mutate(httpCtx.BaseURL(r.Context()), url.WithPath("/auth/logout"))
http.Redirect(w, r, baseURL.String(), http.StatusTemporaryRedirect)
http.Redirect(w, r, baseURL.String(), http.StatusSeeOther)
return
}