Add helmet

This commit is contained in:
Mattéo Delabre 2020-11-29 02:12:59 +01:00
parent 8b5221f8bf
commit e9eb6073c4
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
3 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import express from 'express';
import helmet from 'helmet';
import path from 'path';
import cookieParser from 'cookie-parser';
import logger from 'morgan';
@ -8,6 +9,7 @@ const thisdir = path.dirname(fileURLToPath(import.meta.url));
const app = express();
export default app;
app.use(helmet());
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));

5
package-lock.json generated
View File

@ -183,6 +183,11 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"helmet": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-4.2.0.tgz",
"integrity": "sha512-aoiSxXMd0ks1ojYpSCFoCRzgv4rY/uB9jKStaw8PkXwsdLYa/Gq+Nc5l0soH0cwBIsLAlujPnx4HLQs+LaXCrQ=="
},
"http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",

View File

@ -9,6 +9,7 @@
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"express": "~4.16.1",
"helmet": "^4.2.0",
"morgan": "~1.9.1",
"node-fetch": "^2.6.1",
"xml2js": "^0.4.23"