Skip to content

Commit

Permalink
Updates to allow installation w/ npm3+ & node 4+
Browse files Browse the repository at this point in the history
  • Loading branch information
sgress454 committed Dec 18, 2015
1 parent ce149ac commit 0a6f916
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 192 deletions.
2 changes: 1 addition & 1 deletion lib/hooks/csrf/index.js
Expand Up @@ -77,7 +77,7 @@ module.exports = function(sails) {
var allowCrossOriginCSRF = sails.config.csrf.origin.split(',').map(trim).indexOf(req.headers.origin) > -1;

if (sails.config.csrf.protectionEnabled) {
var connect = require('express/node_modules/connect');
var connect = require('connect');

try {
return connect.csrf()(req, res, function() {
Expand Down
3 changes: 2 additions & 1 deletion lib/hooks/session/index.js
Expand Up @@ -22,7 +22,8 @@ var signCookie = require('cookie-signature').sign;

// (this dependency is only here for sails.session.generate()-
// which is really only here to enable socket lifecycle callbacks)
var ConnectSession = require('express/node_modules/connect').middleware.session.Session;
var ConnectSession = require('connect').middleware.session.Session;




Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -38,6 +38,7 @@
"consolidate": "^0.12.1",
"cookie": "0.1.2",
"cookie-signature": "1.0.6",
"connect": "2.29.1",
"ejs": "~0.8.4",
"ejs-locals": "~1.0.2",
"express": "3.20.2",
Expand Down Expand Up @@ -88,7 +89,6 @@
"istanbul": "*",
"wrench": "~1.5.8",
"benchmark": "~1.0.0",
"microtime": "~1.3.0",
"expect.js": "~0.3.1",
"should": "~5.2.0",
"supertest": "~0.15.0",
Expand Down

0 comments on commit 0a6f916

Please sign in to comment.