Skip to content

Commit

Permalink
csrf: remove deprecated req.session._csrf getter
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Jan 15, 2014
1 parent 29384ea commit 138b21c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/middleware/csrf.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ module.exports = function csrf(options) {
return token || (token = saltedToken(secret));
};

// compatibility with old middleware
Object.defineProperty(req.session, '_csrf', {
configurable: true,
get: function() {
console.warn('req.session._csrf is deprecated, use req.csrfToken() instead');
return req.csrfToken();
}
});

// ignore these methods
if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next();

Expand Down

0 comments on commit 138b21c

Please sign in to comment.