From 943bb21c37b39bfc3c72269431f4539795c62336 Mon Sep 17 00:00:00 2001 From: Kenzo Soreze <135658209+kenzosrz@users.noreply.github.com> Date: Mon, 25 Aug 2025 04:18:31 +0200 Subject: [PATCH] Redirect after fast login --- http/auth.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 } }