PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/config/session.js

https://gitlab.com/n4utilius/formas
JavaScript | 91 lines | 3 code | 15 blank | 73 comment | 0 complexity | 24e7a563ed30408f3f0c94ab6b9b7eaa MD5 | raw file
  1. /**
  2. * Session Configuration
  3. * (sails.config.session)
  4. *
  5. * Sails session integration leans heavily on the great work already done by
  6. * Express, but also unifies Socket.io with the Connect session store. It uses
  7. * Connect's cookie parser to normalize configuration differences between Express
  8. * and Socket.io and hooks into Sails' middleware interpreter to allow you to access
  9. * and auto-save to `req.session` with Socket.io the same way you would with Express.
  10. *
  11. * For more information on configuring the session, check out:
  12. * http://sailsjs.org/#/documentation/reference/sails.config/sails.config.session.html
  13. */
  14. module.exports.session = {
  15. /***************************************************************************
  16. * *
  17. * Session secret is automatically generated when your new app is created *
  18. * Replace at your own risk in production-- you will invalidate the cookies *
  19. * of your users, forcing them to log in again. *
  20. * *
  21. ***************************************************************************/
  22. secret: '9e4e3fadf91797064315ea1dce509b2d',
  23. /***************************************************************************
  24. * *
  25. * Set the session cookie expire time The maxAge is set by milliseconds, *
  26. * the example below is for 24 hours *
  27. * *
  28. ***************************************************************************/
  29. // cookie: {
  30. // maxAge: 24 * 60 * 60 * 1000
  31. // },
  32. /***************************************************************************
  33. * *
  34. * In production, uncomment the following lines to set up a shared redis *
  35. * session store that can be shared across multiple Sails.js servers *
  36. ***************************************************************************/
  37. // adapter: 'redis',
  38. /***************************************************************************
  39. * *
  40. * The following values are optional, if no options are set a redis *
  41. * instance running on localhost is expected. Read more about options at: *
  42. * https://github.com/visionmedia/connect-redis *
  43. * *
  44. * *
  45. ***************************************************************************/
  46. // host: 'localhost',
  47. // port: 6379,
  48. // ttl: <redis session TTL in seconds>,
  49. // db: 0,
  50. // pass: <redis auth password>,
  51. // prefix: 'sess:',
  52. /***************************************************************************
  53. * *
  54. * Uncomment the following lines to use your Mongo adapter as a session *
  55. * store *
  56. * *
  57. ***************************************************************************/
  58. // adapter: 'mongo',
  59. // host: 'localhost',
  60. // port: 27017,
  61. // db: 'sails',
  62. // collection: 'sessions',
  63. /***************************************************************************
  64. * *
  65. * Optional Values: *
  66. * *
  67. * # Note: url will override other connection settings url: *
  68. * 'mongodb://user:pass@host:port/database/collection', *
  69. * *
  70. ***************************************************************************/
  71. // username: '',
  72. // password: '',
  73. // auto_reconnect: false,
  74. // ssl: false,
  75. // stringify: true
  76. };