rolled back dependencies
This commit is contained in:
parent
4522c1d78c
commit
e951077354
|
@ -18,10 +18,9 @@ var fs = require('fs-extra'),
|
|||
multer = require('multer'),
|
||||
passport = require('passport'),
|
||||
raven = require('raven'),
|
||||
MongoStore = require('connect-mongo')(session),
|
||||
// mongoStore = require('connect-mongo')({
|
||||
// session: session
|
||||
// }),
|
||||
mongoStore = require('connect-mongo')({
|
||||
session: session
|
||||
}),
|
||||
flash = require('connect-flash'),
|
||||
config = require('./config'),
|
||||
consolidate = require('consolidate'),
|
||||
|
@ -141,17 +140,27 @@ module.exports = function(db) {
|
|||
app.use(helmet.nosniff());
|
||||
app.use(helmet.ienoopen());
|
||||
app.disable('x-powered-by');
|
||||
var SIX_MONTHS = 15778476000;
|
||||
app.use(helmet.hsts({
|
||||
maxAge: SIX_MONTHS,
|
||||
includeSubdomains: true,
|
||||
force: true
|
||||
}));
|
||||
|
||||
// Setting the app router and static folder
|
||||
app.use('/', express.static(path.resolve('./public')));
|
||||
app.use('/uploads', express.static(path.resolve('./uploads')));
|
||||
|
||||
// Setting the pdf upload route and folder
|
||||
app.use(multer({ dest: config.tmpUploadPath,
|
||||
rename: function (fieldname, filename) {
|
||||
return Date.now();
|
||||
},
|
||||
onFileUploadStart: function (file) {
|
||||
//Check to make sure we can only upload images and pdfs
|
||||
console.log(file.originalname + ' is starting ...');
|
||||
},
|
||||
onFileUploadComplete: function (file, req, res) {
|
||||
console.log(file.originalname + ' uploaded to ' + file.path);
|
||||
// console.log('\n\nheadersSent in onFileUploadComplete: ', res.headersSent);
|
||||
// res.status(200).send(file);
|
||||
}
|
||||
}));
|
||||
|
||||
// CookieParser should be above session
|
||||
app.use(cookieParser());
|
||||
|
||||
|
@ -160,12 +169,12 @@ module.exports = function(db) {
|
|||
saveUninitialized: true,
|
||||
resave: true,
|
||||
secret: config.sessionSecret,
|
||||
store: new MongoStore({
|
||||
mongooseConnection: db.connection,
|
||||
store: new mongoStore({
|
||||
db: db.connection.db,
|
||||
collection: config.sessionCollection
|
||||
}),
|
||||
cookie: config.sessionCookie,
|
||||
name: config.sessionName,
|
||||
name: config.sessionName
|
||||
}));
|
||||
|
||||
// use passport session
|
||||
|
|
86
package.json
86
package.json
|
@ -22,63 +22,71 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"async": "^1.4.2",
|
||||
"bcrypt": "^0.8.5",
|
||||
"body-parser": "~1.14.1",
|
||||
"bower": "~1.6.5",
|
||||
"chalk": "~1.1.1",
|
||||
"compression": "~1.6.0",
|
||||
"body-parser": "~1.9.0",
|
||||
"bower": "~1.3.8",
|
||||
"chalk": "~1.0.0",
|
||||
"compression": "~1.2.0",
|
||||
"connect-flash": "~0.1.1",
|
||||
"connect-mongo": "~0.8.2",
|
||||
"consolidate": "~0.13.1",
|
||||
"cookie-parser": "~1.4.0",
|
||||
"connect-mongo": "~0.4.1",
|
||||
"consolidate": "~0.10.0",
|
||||
"cookie-parser": "~1.3.2",
|
||||
"email-verification": "whitef0x0/node-email-verification",
|
||||
"express": "~4.13.3",
|
||||
"express-session": "~1.12.1",
|
||||
"forever": "~0.15.1",
|
||||
"fs-extra": "~0.26.0",
|
||||
"express": "~4.10.1",
|
||||
"express-session": "~1.9.1",
|
||||
"forever": "~0.11.0",
|
||||
"fs-extra": "~0.18.3",
|
||||
"glob": "~4.0.5",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-cli": "~0.1.13",
|
||||
"grunt-concurrent": "~2.0.4",
|
||||
"grunt-contrib-csslint": "~0.5.0",
|
||||
"grunt-contrib-cssmin": "~0.14.0",
|
||||
"grunt-contrib-jshint": "~0.11.3",
|
||||
"grunt-contrib-uglify": "~0.10.0",
|
||||
"grunt-concurrent": "~1.0.0",
|
||||
"grunt-contrib-csslint": "~0.3.1",
|
||||
"grunt-contrib-cssmin": "~0.10.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-uglify": "~0.6.0",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-env": "~0.4.1",
|
||||
"grunt-html2js": "^0.3.5",
|
||||
"grunt-karma": "~0.12.1",
|
||||
"grunt-karma": "~0.9.0",
|
||||
"grunt-mocha-test": "~0.12.1",
|
||||
"grunt-newer": "~1.1.1",
|
||||
"grunt-ng-annotate": "~1.0.1",
|
||||
"grunt-node-inspector": "~0.4.1",
|
||||
"grunt-nodemon": "~0.4.0",
|
||||
"helmet": "~0.13.0",
|
||||
"load-grunt-tasks": "~3.3.0",
|
||||
"lodash": "^3.10.1",
|
||||
"main-bower-files": "~2.9.0",
|
||||
"grunt-ng-annotate": "~0.4.0",
|
||||
"grunt-node-inspector": "~0.1.3",
|
||||
"grunt-nodemon": "~0.3.0",
|
||||
"helmet": "~0.5.0",
|
||||
"karma": "~0.12.0",
|
||||
"karma-chrome-launcher": "~0.1.2",
|
||||
"karma-coverage": "~0.2.0",
|
||||
"karma-firefox-launcher": "~0.1.3",
|
||||
"karma-jasmine": "^0.2.3",
|
||||
"karma-phantomjs-launcher": "~0.1.2",
|
||||
"load-grunt-tasks": "~1.0.0",
|
||||
"lodash": "~2.4.1",
|
||||
"mailosaur": "^1.0.1",
|
||||
"main-bower-files": "~2.8.2",
|
||||
"math": "0.0.3",
|
||||
"method-override": "~2.3.0",
|
||||
"mocha": ">=1.20.0",
|
||||
"mongoose": "~3.8.8",
|
||||
"mongoose-utilities": "^0.1.1",
|
||||
"morgan": "~1.6.1",
|
||||
"multer": "~1.1.0",
|
||||
"nodemailer": "~1.8.0",
|
||||
"passport": "~0.3.0",
|
||||
"passport-facebook": "~2.0.0",
|
||||
"passport-github": "~1.0.0",
|
||||
"passport-google-oauth": "~0.2.0",
|
||||
"passport-linkedin": "~1.0.0",
|
||||
"morgan": "~1.4.1",
|
||||
"multer": "~0.1.8",
|
||||
"pdffiller": "~0.0.7",
|
||||
"nodemailer": "~1.3.0",
|
||||
"nools": "^0.4.1",
|
||||
"passport": "~0.2.0",
|
||||
"passport-facebook": "~1.0.2",
|
||||
"passport-github": "~0.1.5",
|
||||
"passport-google-oauth": "~0.1.5",
|
||||
"passport-linkedin": "~0.1.3",
|
||||
"passport-local": "~1.0.0",
|
||||
"passport-twitter": "~1.0.2",
|
||||
"pdffiller": "~0.1.1",
|
||||
"rand-token": "^0.2.1",
|
||||
"raven": "^0.8.1",
|
||||
"request": "^2.60.0",
|
||||
"request-promise": "^1.0.2",
|
||||
"request-promise": "^0.4.3",
|
||||
"satelize": "~0.1.1",
|
||||
"soap": "^0.11.0",
|
||||
"shortid": "^2.2.2",
|
||||
"should": "~4.1.0",
|
||||
"soap": "^0.9.1",
|
||||
"supertest": "~0.14.0",
|
||||
"supertest-session": "^1.0.0",
|
||||
"swig": "~1.4.1",
|
||||
"then-fs": "~2.0.0"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue