Skip to content

Commit

Permalink
Add Helmet and routine npm dependency updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ho <[email protected]>
  • Loading branch information
jujaga committed Jan 17, 2024
1 parent 2a951ba commit 4c9eaef
Show file tree
Hide file tree
Showing 5 changed files with 289 additions and 483 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 4c9eaef

Please sign in to comment.