summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--auth.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/auth.go b/auth.go
index 601f28a..3613530 100644
--- a/auth.go
+++ b/auth.go
@@ -107,6 +107,9 @@ func showLoginPage(w http.ResponseWriter, u User) {
func loginPage() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
+ if session(r).Authenticated {
+ http.Redirect(w, r, "/", http.StatusFound)
+ }
showLoginPage(w, User{})
}
}