added helmet middleware

This commit is contained in:
Abhinav Adduri 2017-06-19 15:51:48 -07:00
parent 6e38446f1e
commit 4e4dc5e168
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
"express": "^4.15.3",
"express-handlebars": "^3.0.0",
"fs-extra": "^3.0.1",
"helmet": "^3.6.1",
"jquery": "^3.2.1",
"mozlog": "^2.1.1",
"node-fetch": "^1.7.1",

View File

@ -3,6 +3,7 @@ const exphbs = require('express-handlebars');
const busboy = require('connect-busboy');
const path = require('path');
const bodyParser = require('body-parser');
const helmet = require('helmet');
const bytes = require('bytes');
const conf = require('./config.js');
const storage = require('./storage.js');
@ -18,9 +19,9 @@ const app = express();
app.engine('handlebars', exphbs({ defaultLayout: 'main' }));
app.set('view engine', 'handlebars');
app.use(helmet());
app.use(busboy());
app.use(bodyParser.json());
app.use(express.static(path.join(__dirname, '../public')));
app.get('/', (req, res) => {