Calculate nextURI and redirect
This commit is contained in:
parent
c84cea1d5c
commit
6c06f49279
|
@ -78,12 +78,11 @@ func (h *IndieAuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
sess.Me = authResponse.Me
|
||||
sess.LoggedIn = true
|
||||
|
||||
log.Printf("SESSION: %#v\n", sess)
|
||||
nextURI := "/"
|
||||
if sess.NextURI != "" {
|
||||
http.Redirect(w, r, sess.NextURI, 302)
|
||||
} else {
|
||||
http.Redirect(w, r, "/", 302)
|
||||
nextURI = sess.NextURI
|
||||
}
|
||||
http.Redirect(w, r, nextURI, 302)
|
||||
return
|
||||
}
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user