Skip to content
This repository has been archived by the owner on Nov 17, 2019. It is now read-only.

Latest commit

 

History

History
12 lines (9 loc) · 434 Bytes

6-tracker.md

File metadata and controls

12 lines (9 loc) · 434 Bytes

Session Tracker

Tracker is the session's track methods. Default tracker is CookieTracker which store SessionID on the cookie. And we provide HeaderTracker. For example:

sess := session.New(session.Options{
	Tracker: session.NewHeaderTracker(session.DefaultSessionIdName),
	MaxAge: sessionTimeout,
})

HeaderTracker will read the http request's Header which named session.DefaultSessionIdName to track the session.