Browse Source

refactor: add helmet for protection

develop
Apostolos Fanakis 4 years ago
parent
commit
8ad2f3cb49
  1. 1
      packages/concordia-contracts-provider/package.json
  2. 2
      packages/concordia-contracts-provider/src/index.js
  3. 5
      yarn.lock

1
packages/concordia-contracts-provider/package.json

@ -13,6 +13,7 @@
"esm": "~3.2.25", "esm": "~3.2.25",
"express": "^4.17.1", "express": "^4.17.1",
"express-async-handler": "^1.1.4", "express-async-handler": "^1.1.4",
"helmet": "^4.4.1",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"multer": "^1.4.2", "multer": "^1.4.2",
"multiparty": "^4.2.2" "multiparty": "^4.2.2"

2
packages/concordia-contracts-provider/src/index.js

@ -1,5 +1,6 @@
import express from 'express'; import express from 'express';
import cors from 'cors'; import cors from 'cors';
import helmet from 'helmet';
import initRoutes from './routes/web'; import initRoutes from './routes/web';
import constants from './constants'; import constants from './constants';
@ -17,6 +18,7 @@ const corsOptions = {
app.use(express.urlencoded({ extended: true })); app.use(express.urlencoded({ extended: true }));
app.use(cors(corsOptions)); app.use(cors(corsOptions));
app.use(helmet());
initRoutes(app); initRoutes(app);

5
yarn.lock

@ -7716,6 +7716,11 @@ heap@~0.2.6:
resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac"
integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw=
helmet@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/helmet/-/helmet-4.4.1.tgz#a17e1444d81d7a83ddc6e6f9bc6e2055b994efe7"
integrity sha512-G8tp0wUMI7i8wkMk2xLcEvESg5PiCitFMYgGRc/PwULB0RVhTP5GFdxOwvJwp9XVha8CuS8mnhmE8I/8dx/pbw==
hex-color-regex@^1.1.0: hex-color-regex@^1.1.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"

Loading…
Cancel
Save