From 9220c57f2aef3cfc35ec3dbaa076cff7b4aac387 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Thu, 19 Dec 2019 09:08:50 +0000
Subject: [PATCH] Added missing URL prefix to the unauthenticated redirect to
 login

---
 server/login/login.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/login/login.go b/server/login/login.go
index c524acc..050fe62 100644
--- a/server/login/login.go
+++ b/server/login/login.go
@@ -187,7 +187,7 @@ func (l *Login) ServeHTTP(w http.ResponseWriter, req *http.Request) {
 		} else if !session.Authenticated {
 			// Save the current URL in the session for later redirect.
 			session.Redir = req.URL.String()
-			http.Redirect(w, req, "/login", http.StatusFound)
+			http.Redirect(w, req, l.urlFor("/login"), http.StatusFound)
 			return
 		}
 
-- 
GitLab