Skip to content

Commit

Permalink
Merge pull request #105 from bcgov/sec/helmet
Browse files Browse the repository at this point in the history
Add Helmet and update openshift router ingress network policy
  • Loading branch information
TimCsaky authored Jan 17, 2024
2 parents 651b856 + 4c9eaef commit 2e5d24b
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 487 deletions.
12 changes: 5 additions & 7 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
const Problem = require('api-problem');
const compression = require('compression');
const config = require('config');
const cors = require('cors');
const express = require('express');
const Problem = require('api-problem');
const helmet = require('helmet');

const { name: appName, version: appVersion } = require('./package.json');
const carboneCopyApi = require('./src/components/carboneCopyApi');
Expand All @@ -29,12 +30,9 @@ app.use(cors({
/** Set true to dynamically set Access-Control-Allow-Origin based on Origin */
origin: true
}));
app.use(express.json({
limit: config.get('server.bodyLimit')
}));
app.use(express.urlencoded({
extended: false
}));
app.use(express.json({ limit: config.get('server.bodyLimit') }));
app.use(express.urlencoded({ extended: false }));
app.use(helmet());

// Print out configuration settings in verbose startup
log.verbose('Config', prettyStringify(config));
Expand Down
Loading

0 comments on commit 2e5d24b

Please sign in to comment.