// You must set REMOTE_ADDR environmental variable to make use of IP matching
You must set REMOTE_ADDR environmental variable to make use of IP matching
// You must set REMOTE_ADDR environmental variable to make use of IP matching
func (ss *SessionStore) IPMatches() bool {
	if ss.session.config.IPMatch == false {
		log.Printf("IP Checking is disabled")
		return true
	}
	if ip := os.Getenv("REMOTE_ADDR"); ip != "" {
		log.Printf("Checking IP of client %s vs session %s", ip, ss.ParamString("_SESSION_REMOTE_ADDR"))
		if ss.ParamString("_SESSION_REMOTE_ADDR") == ip {
			return true
		}
		log.Printf("THE IP DOES NOT MATCH!\n")
		return false
	} else {
		return true 
	}
}
func ( ss * SessionStore ) IPMatches ( ) bool { if ss . session . config . IPMatch == false { log . Printf ( " " ) return true } if ip := os . Getenv ( " " ) ; ip != " " { log . Printf ( " " , ip , ss . ParamString ( " " ) ) if ss . ParamString ( " " ) == ip { return true } log . Printf ( " \n " ) return false } else { return true } }
You must set REMOTE_ADDR environmental variable to make use of IP matching
You must set REMOTE_ADDR environmental variable to make use of IP matching
// Just return true if we have not enabled IP matching // We don't have the client IP address, so we will not verify it