diff --git a/http/auth.go b/http/auth.go index 535953fb2d..53afaabdbc 100644 --- a/http/auth.go +++ b/http/auth.go @@ -154,7 +154,12 @@ func fastLoginHandler(tokenExpireTime time.Duration) handleFunc { return http.StatusInternalServerError, err } setAuthCookie(w, r, signed, tokenExpireTime) - w.WriteHeader(http.StatusNoContent) + + redirect := r.URL.Query().Get("redirect") + if redirect == "" { + redirect = "/" + } + http.Redirect(w, r, redirect, http.StatusFound) return 0, nil } }