-
Notifications
You must be signed in to change notification settings - Fork 2
/
cookies.js.example
29 lines (26 loc) · 996 Bytes
/
cookies.js.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// example cookie's configuration
module.exports = function () {
return [
// first cookie
{
'name': 'Valid-Cookie-Name-One', /* required property */
'value': 'Valid-Cookie-Value', /* required property */
'domain': 'localhost', /* required property */
'path': '/foo',
'httponly': true,
'secure': false,
'expires': (new Date()).getTime() + (1000 * 60 * 60) /* <-- expires in 1 hour */
},
// second cookie
{
'name': 'Valid-Cookie-Name-One', /* required property */
'value': 'Valid-Cookie-Value', /* required property */
'domain': 'localhost', /* required property */
'path': '/foo',
'httponly': true,
'secure': false,
'expires': (new Date()).getTime() + (1000 * 60 * 60) /* <-- expires in 1 hour */
},
// more cookies ...
];
};