cookie-parser

可以与cookie-session配合,获取cookie中的cookie对象 ```javascript const http = require('http'); const connect = require('connect'); const cookieParser = require('cookie-parser');

const app = connect(); app.use(cookieParser("my-secret")); app.use((req, res) => { console.log('Cookies: ', req.cookies); console.log('Signed Cookies: ', req.signedCookies) }) http.createServer(app).listen(3000); ``` cookie-parser的输出

results matching ""

    No results matching ""