I'm using gin framework and I'm redirecting signin to home page when the user is already signed in. It shows this html element on the home page.
<a href="/signin">Found</a> "."
How to disable that element from the app?
This is my app code.
func GetSignIn(c *gin.Context) {
// Get session from cookie. Check if email exists
// redirect to Home page else show signin page.
session := sessions.Default(c)
if session.Get("email") != nil {
fmt.Println(session.Get("email"))
c.Redirect(302, "/")
}
c.HTML(200, "signin.html", "")
}
It seems like, it's a Go thing https://github.com/golang/go/blob/master/src/net/http/server.go#L2014
But I'm not sure, how to disable it. Would be great if someone guide me.
Thanks!