Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
added helmet in server.js (#1674)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Yang <kevinyang@Kevins-RCMP-MacBook-Pro.local>
Co-authored-by: ngosset <norman.gosset@cds-snc.ca>
  • Loading branch information
3 people committed Mar 17, 2020
1 parent 19ba926 commit 20a0a1d
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 0 deletions.
135 changes: 135 additions & 0 deletions f2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions f2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"final-form": "^4.18.7",
"formidable": "^1.2.1",
"get-user-locale": "^1.3.0",
"helmet": "^3.21.3",
"isomorphic-unfetch": "^3.0.0",
"ldapjs": "^1.0.2",
"mongodb": "^3.5.3",
Expand Down
2 changes: 2 additions & 0 deletions f2/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {
submitFeedback,
} = require('./src/utils/notify')
const { formatAnalystEmail } = require('./src/utils/formatAnalystEmail')
const helmet = require('helmet')

// set up rate limiter: maximum of 100 requests per minute (about 12 page loads)
var RateLimit = require('express-rate-limit')
Expand All @@ -38,6 +39,7 @@ const uidList = process.env.LDAP_UID
getAllCerts(uidList)

const app = express()
app.use(helmet())

const allowedOrigins = [
'https://dev.antifraudcentre-centreantifraude.ca',
Expand Down

0 comments on commit 20a0a1d

Please sign in to comment.