移除cookie中间件,植入request&response当中

v1
宇天 2020-09-21 19:26:38 +08:00
parent cd1fca1858
commit b2c424a384
2 changed files with 8 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import fs from 'iofs'
// import Ioredis from 'ioredis'
import Request from '@gm5/request'
import Response from '@gm5/response'
import Cookie from '@gm5/cookie'
// import Session from '@gm5/session'
import init from './lib/reg-init.js'
@ -20,7 +19,7 @@ import Log from './lib/log.js' //基础日志记录工具
import routerWare from './middleware/router.js'
import credentialsWare from './middleware/credentials.js'
// import cookieWare from '@gm5/cookie'
// import sessionWare from './module/session.js'
var log = console.log
@ -66,7 +65,6 @@ export default class Five {
// 将session和cookie的中间件提到最前
// 以便用户自定义的中间件可以直接操作session和cookie
// this.__MIDDLEWARE__.unshift(sessionWare)
this.__MIDDLEWARE__.unshift(Cookie)
this.__MIDDLEWARE__.unshift(credentialsWare)
this.use(routerWare)

View File

@ -6,13 +6,13 @@
"author": "yutent <yutent.io@gmail.com>",
"main": "index.js",
"dependencies": {
"@gm5/cookie": "^1.0.0",
"@gm5/session": "^1.0.0",
"@gm5/request": "^1.0.0",
"@gm5/response": "^1.0.0",
"@gm5/request": "^1.2.0",
"@gm5/response": "^1.3.0",
"@gm5/controller": "^1.0.0",
"crypto.js": "^2.0.1",
"es.shim": "^2.0.0",
"iofs": "^2.0.0"
"es.shim": "^2.0.1",
"iofs": "^1.5.0"
},
"devDependencies": {},
"repository": {