Preserve safe return paths through sign-in
CI / test (push) Failing after 3m18s

This commit is contained in:
2026-09-16 05:36:36 +02:00
parent b6d264c9ec
commit 87809b2344
8 changed files with 116 additions and 6 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ func (app *application) handleAPIError(w http.ResponseWriter, r *http.Request, e
if errors.As(err, &apiError) {
switch apiError.StatusCode {
case http.StatusUnauthorized:
http.Redirect(w, r, webPath("login"), http.StatusSeeOther)
http.Redirect(w, r, loginPathForRequest(r), http.StatusSeeOther)
return
case http.StatusForbidden:
if user, ok := userFromContext(r.Context()); ok && !user.Activated {