Skip to content

Commit

Permalink
Added description about Max-Age field in Options (#148)
Browse files Browse the repository at this point in the history
In this commit, the behavior of Max-Age field is described based on its
different values.
Fixes #131
  • Loading branch information
Kshitij Saraogi authored and kisielk committed Mar 12, 2018
1 parent 7087b4d commit 7910f5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const flashesKey = "_flash"
type Options struct {
Path string
Domain string
// MaxAge=0 means no 'Max-Age' attribute specified.
// MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'.
// MaxAge=0 means no Max-Age attribute specified and the cookie will be
// deleted after the browser session ends.
// MaxAge<0 means delete cookie immediately.
// MaxAge>0 means Max-Age attribute present and given in seconds.
MaxAge int
Secure bool
Expand Down

0 comments on commit 7910f5b

Please sign in to comment.