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
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
}, },