Merge pull request #1064 from SISheogorath/fix/hstsSeconds

Fix wrong maxAgeSeconds multiplication
This commit is contained in:
Christoph (Sheogorath) Kern 2018-11-21 01:29:04 +01:00 committed by GitHub
commit 2244b11730
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
app.js
View file

@ -83,7 +83,7 @@ app.use(compression())
// use hsts to tell https users stick to this // use hsts to tell https users stick to this
if (config.hsts.enable) { if (config.hsts.enable) {
app.use(helmet.hsts({ app.use(helmet.hsts({
maxAge: config.hsts.maxAgeSeconds * 1000, maxAge: config.hsts.maxAgeSeconds,
includeSubdomains: config.hsts.includeSubdomains, includeSubdomains: config.hsts.includeSubdomains,
preload: config.hsts.preload preload: config.hsts.preload
})) }))

View file

@ -13,7 +13,7 @@ module.exports = {
useSSL: false, useSSL: false,
hsts: { hsts: {
enable: true, enable: true,
maxAgeSeconds: 31536000, maxAgeSeconds: 60 * 60 * 24 * 365,
includeSubdomains: true, includeSubdomains: true,
preload: true preload: true
}, },