File tree 3 files changed +40
-17
lines changed
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 (
16
16
// Default flashes key.
17
17
const flashesKey = "_flash"
18
18
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
-
36
19
// Session --------------------------------------------------------------------
37
20
38
21
// NewSession is called by session stores to create a new session instance.
You can’t perform that action at this time.
0 commit comments