您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

33 行
559 B

  1. /*
  2. * @Description: session配置
  3. * @Author: hai-27
  4. * @Date: 2020-04-07 22:28:43
  5. * @LastEditors: hai-27
  6. * @LastEditTime: 2020-04-07 22:29:28
  7. */
  8. let store = {
  9. storage: {},
  10. set (key, session) {
  11. this.storage[key] = session;
  12. },
  13. get (key) {
  14. return this.storage[key];
  15. },
  16. destroy (key) {
  17. delete this.storage[key];
  18. }
  19. }
  20. let CONFIG = {
  21. key: 'koa:session',
  22. maxAge: 86400000,
  23. autoCommit: true,
  24. overwrite: true,
  25. httpOnly: true,
  26. signed: true,
  27. rolling: false,
  28. renew: false,
  29. sameSite: null,
  30. store
  31. }
  32. module.exports = CONFIG;