Browse Source

Add helmet

master
Mattéo Delabre 3 months ago
parent
commit
e9eb6073c4
Signed by: matteo <spam@delab.re> GPG Key ID: AE3FBD02DC583ABB
3 changed files with 8 additions and 0 deletions
  1. +2
    -0
      app.mjs
  2. +5
    -0
      package-lock.json
  3. +1
    -0
      package.json

+ 2
- 0
app.mjs 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
- 0
package-lock.json 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",


+ 1
- 0
package.json 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"


Loading…
Cancel
Save