Skip to content

Commit

Permalink
Updating To Helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Apr 23, 2014
2 parents 81254e0 + 72c813d commit 56fd75e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var express = require('express'),
compress = require('compression'),
methodOverride = require('method-override'),
cookieParser = require('cookie-parser'),
helmet = require('helmet'),
passport = require('passport'),
mongoStore = require('connect-mongo')({
session: session
Expand Down Expand Up @@ -98,6 +99,13 @@ module.exports = function(db) {
// connect flash for flash messages
app.use(flash());

// Use helmet to secure Express headers
app.use(helmet.xframe());
app.use(helmet.iexss());
app.use(helmet.contentTypeOptions());
app.use(helmet.ienoopen());
app.disable('x-powered-by');

// Setting the app router and static folder
app.use(express.static(path.resolve('./public')));

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"morgan": "~1.0.0",
"connect-mongo": "~0.4.0",
"connect-flash": "~0.1.1",
"helmet": "~0.2.1",
"consolidate": "~0.10.0",
"swig": "~1.3.2",
"mongoose": "~3.8.8",
Expand Down

0 comments on commit 56fd75e

Please sign in to comment.