-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsession.js
More file actions
48 lines (42 loc) · 2.39 KB
/
Copy pathsession.js
File metadata and controls
48 lines (42 loc) · 2.39 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Session Configuration
* (sails.config.session)
*
* Use the settings below to configure session integration in your app.
* (for additional recommended settings, see `config/env/production.js`)
*
* For all available options, see:
* https://sailsjs.com/config/session
*/
module.exports.session = {
/***************************************************************************
* *
* Session secret is automatically generated when your new app is created *
* Replace at your own risk in production-- you will invalidate the cookies *
* of your users, forcing them to log in again. *
* *
***************************************************************************/
secret: '528ba42f15ea9433bb5cc8916b7821c6',
/***************************************************************************
* Persistent session store (Redis), backed by the fog-node-redis container.*
* Required for CSRF: the CSRF secret lives in the session, and the default *
* in-memory store doesn't persist it reliably across requests (and wipes *
* every login on restart). See the Redis Quadlet + README. *
***************************************************************************/
adapter: '@sailshq/connect-redis',
url: 'redis://127.0.0.1:6379/0',
/***************************************************************************
* *
* Customize when built-in session support will be skipped. *
* *
* (Useful for performance tuning; particularly to avoid wasting cycles on *
* session management when responding to simple requests for static assets, *
* like images or stylesheets.) *
* *
* https://sailsjs.com/config/session *
* *
***************************************************************************/
// isSessionDisabled: function (req){
// return !!req.path.match(req._sails.LOOKS_LIKE_ASSET_RX);
// },
};