Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
use helmet module to more secure application
Browse files Browse the repository at this point in the history
Helmet module is the middleware to add security headers for Application.
I think these headers is so important for security that we should also use in MEAN.js.

We need to install the latest one from github currently because it looks old on the npm site.
The old one is not working on my local MEAN.js stack.
  • Loading branch information
memolog committed Mar 30, 2014
1 parent 12cb3bf commit afb0f97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 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'),
config = require('./config'),
consolidate = require('consolidate'),
path = require('path'),
helmet = require('helmet'),
utilities = require('./utilities');

module.exports = function(db) {
Expand Down Expand Up @@ -98,6 +99,8 @@ module.exports = function(db) {
// connect flash for flash messages
app.use(flash());

app.use(helmet.defaults());

// routes should be at the last
app.use(app.router);

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"lodash": "~2.4.1",
"forever": "~0.10.11",
"bower": "~1.3.1",
"grunt-cli": "~0.1.13"
"grunt-cli": "~0.1.13",
"helmet": "git://github.com/evilpacket/helmet.git"
},
"devDependencies": {
"supertest": "~0.9.0",
Expand Down

0 comments on commit afb0f97

Please sign in to comment.