Redirect from /auth to / when logged in
This commit is contained in:
parent
6c06f49279
commit
f7b8018c62
|
@ -31,6 +31,10 @@ func (h *IndieAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
defer sess.Flush()
|
||||
|
||||
if r.Method == http.MethodGet {
|
||||
if sess.LoggedIn {
|
||||
http.Redirect(w, r, "/", 302)
|
||||
return
|
||||
}
|
||||
if r.URL.Path == "" {
|
||||
fmt.Fprint(w, `<!doctype html>
|
||||
<html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user