File tree Expand file tree Collapse file tree 3 files changed +40
-17
lines changed
Expand file tree Collapse file tree 3 files changed +40
-17
lines changed Original file line number Diff line number Diff line change 1+ // +build !go1.11
2+
3+ package sessions
4+
5+ // Options stores configuration for a session or session store.
6+ //
7+ // Fields are a subset of http.Cookie fields.
8+ type Options struct {
9+ Path string
10+ Domain string
11+ // MaxAge=0 means no Max-Age attribute specified and the cookie will be
12+ // deleted after the browser session ends.
13+ // MaxAge<0 means delete cookie immediately.
14+ // MaxAge>0 means Max-Age attribute present and given in seconds.
15+ MaxAge int
16+ Secure bool
17+ HttpOnly bool
18+ }
Original file line number Diff line number Diff line change 1+ // +build go1.11
2+
3+ package sessions
4+
5+ import "net/http"
6+
7+ // Options stores configuration for a session or session store.
8+ //
9+ // Fields are a subset of http.Cookie fields.
10+ type Options struct {
11+ Path string
12+ Domain string
13+ // MaxAge=0 means no Max-Age attribute specified and the cookie will be
14+ // deleted after the browser session ends.
15+ // MaxAge<0 means delete cookie immediately.
16+ // MaxAge>0 means Max-Age attribute present and given in seconds.
17+ MaxAge int
18+ Secure bool
19+ HttpOnly bool
20+ // Defaults to http.SameSiteDefaultMode
21+ SameSite http.SameSite
22+ }
Original file line number Diff line number Diff line change @@ -16,23 +16,6 @@ import (
1616// Default flashes key.
1717const flashesKey = "_flash"
1818
19- // Options --------------------------------------------------------------------
20-
21- // Options stores configuration for a session or session store.
22- //
23- // Fields are a subset of http.Cookie fields.
24- type Options struct {
25- Path string
26- Domain string
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.
30- // MaxAge>0 means Max-Age attribute present and given in seconds.
31- MaxAge int
32- Secure bool
33- HttpOnly bool
34- }
35-
3619// Session --------------------------------------------------------------------
3720
3821// NewSession is called by session stores to create a new session instance.
You can’t perform that action at this time.
0 commit comments