aboutsummaryrefslogtreecommitdiffstats
path: root/config/session.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/session.js')
-rw-r--r--config/session.js98
1 files changed, 0 insertions, 98 deletions
diff --git a/config/session.js b/config/session.js
deleted file mode 100644
index b2174da..0000000
--- a/config/session.js
+++ /dev/null
@@ -1,98 +0,0 @@
1
2const Env = use('Env');
3
4module.exports = {
5 /*
6 |--------------------------------------------------------------------------
7 | Session Driver
8 |--------------------------------------------------------------------------
9 |
10 | The session driver to be used for storing session values. It can be
11 | cookie, file or redis.
12 |
13 | For `redis` driver, make sure to install and register `@adonisjs/redis`
14 |
15 */
16 driver: Env.get('SESSION_DRIVER', 'cookie'),
17
18 /*
19 |--------------------------------------------------------------------------
20 | Cookie Name
21 |--------------------------------------------------------------------------
22 |
23 | The name of the cookie to be used for saving session id. Session ids
24 | are signed and encrypted.
25 |
26 */
27 cookieName: 'adonis-session',
28
29 /*
30 |--------------------------------------------------------------------------
31 | Clear session when browser closes
32 |--------------------------------------------------------------------------
33 |
34 | If this value is true, the session cookie will be temporary and will be
35 | removed when browser closes.
36 |
37 */
38 clearWithBrowser: true,
39
40 /*
41 |--------------------------------------------------------------------------
42 | Session age
43 |--------------------------------------------------------------------------
44 |
45 | This value is only used when `clearWithBrowser` is set to false. The
46 | age must be a valid https://npmjs.org/package/ms string or should
47 | be in milliseconds.
48 |
49 | Valid values are:
50 | '2h', '10d', '5y', '2.5 hrs'
51 |
52 */
53 age: '2h',
54
55 /*
56 |--------------------------------------------------------------------------
57 | Cookie options
58 |--------------------------------------------------------------------------
59 |
60 | Cookie options defines the options to be used for setting up session
61 | cookie
62 |
63 */
64 cookie: {
65 httpOnly: true,
66 path: '/',
67 sameSite: true,
68 },
69
70 /*
71 |--------------------------------------------------------------------------
72 | Sessions location
73 |--------------------------------------------------------------------------
74 |
75 | If driver is set to file, we need to define the relative location from
76 | the temporary path or absolute url to any location.
77 |
78 */
79 file: {
80 location: 'sessions',
81 },
82
83 /*
84 |--------------------------------------------------------------------------
85 | Redis config
86 |--------------------------------------------------------------------------
87 |
88 | The configuration for the redis driver.
89 |
90 */
91 redis: {
92 host: '127.0.0.1',
93 port: 6379,
94 password: null,
95 db: 0,
96 keyPrefix: '',
97 },
98};