Sha256: 51a0996c44148affc91fd0db0fefd63daf33c46d16318f4f775208f6bc0edc85
Contents?: true
Size: 694 Bytes
Versions: 26
Compression:
Stored size: 694 Bytes
Contents
/*! * Ext JS Connect * Copyright(c) 2010 Sencha Inc. * MIT Licensed */ /** * Module dependencies. */ var utils = require('./../utils'); /** * Parse _Cookie_ header and populate `req.cookies`. * * @return {Function} * @api public */ module.exports = function cookieDecoder(){ return function cookieDecoder(req, res, next) { var cookie = req.headers.cookie; req.cookies = {}; if (cookie) { try { req.cookies = utils.parseCookie(cookie); delete req.headers.cookie; } catch (err) { // Ignore } next(); } else { next(); } }; };
Version data entries
26 entries across 26 versions & 1 rubygems