Skip to content

Commit

Permalink
added helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterjan84 committed Nov 29, 2021
1 parent 448ae5a commit baf1932
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"ejs": "^3.1.6",
"express": "^4.17.1",
"express-validator": "^6.13.0",
"helmet": "^4.6.0",
"inversify": "^5.1.1",
"lru-cache": "^6.0.0",
"moment": "^2.24.0",
Expand Down
2 changes: 2 additions & 0 deletions src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ import { getDateFromParam } from '../shared/utilities/getDateFromParam';
import { subscriptionRouter } from '../network-event-notifications/infrastructure/http/SubscriptionRouter';
import * as bodyParser from 'body-parser';
import { Server } from 'net';
import helmet = require('helmet');

let server: Server;
const api = express();
api.use(bodyParser.json());
api.use(helmet());

const setup = async (): Promise<{ config: Config; kernel: Kernel }> => {
const configResult = getConfigFromEnv();
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2297,6 +2297,11 @@ has@^1.0.3:
dependencies:
function-bind "^1.1.1"

helmet@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/helmet/-/helmet-4.6.0.tgz#579971196ba93c5978eb019e4e8ec0e50076b4df"
integrity sha512-HVqALKZlR95ROkrnesdhbbZJFi/rIVSoNq6f3jA/9u6MIbTsPh3xZwihjeI5+DO/2sOV6HMHooXcEOuwskHpTg==

highlight.js@^10.7.1:
version "10.7.3"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
Expand Down

0 comments on commit baf1932

Please sign in to comment.