@tugou/session
Advanced tools
@@ -20,10 +20,9 @@ "use strict"; | ||
| // 使用 config 传入的 redis 配置 | ||
| this.config = Object.assign(this.config, { | ||
| const config = Object.assign(this.config, { | ||
| store: redisStore(this.config.redis) | ||
| }); | ||
| // session 初始化不需要 redis 的配置(上面已经用过了), 删除 | ||
| delete this.config.redis; | ||
| console.info('[session] ', this.config); | ||
| delete config.redis; | ||
| try { | ||
| this.app.use(session(this.config, this.app)); | ||
| this.app.use(session(config, this.app)); | ||
| console.info('[session] success.'); | ||
@@ -30,0 +29,0 @@ } |
+2
-2
| { | ||
| "name": "@tugou/session", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "tugou midwayjs session", | ||
@@ -28,3 +28,3 @@ "main": "dist/index", | ||
| "license": "MIT", | ||
| "gitHead": "8b9f995d9d16d9ad48da02273d7dca82fe82127d" | ||
| "gitHead": "20aec6aff8c5f85d812ebfac85ed160ee4724f84" | ||
| } |
3605
-1.58%73
-1.35%