Skip to content

Commit 7910f5b

Browse files
Kshitij Saraogikisielk
Kshitij Saraogi
authored andcommitted
Added description about Max-Age field in Options (#148)
In this commit, the behavior of Max-Age field is described based on its different values. Fixes #131
1 parent 7087b4d commit 7910f5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sessions.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ const flashesKey = "_flash"
2424
type Options struct {
2525
Path string
2626
Domain string
27-
// MaxAge=0 means no 'Max-Age' attribute specified.
28-
// MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'.
27+
// MaxAge=0 means no Max-Age attribute specified and the cookie will be
28+
// deleted after the browser session ends.
29+
// MaxAge<0 means delete cookie immediately.
2930
// MaxAge>0 means Max-Age attribute present and given in seconds.
3031
MaxAge int
3132
Secure bool

0 commit comments

Comments
 (0)