diff options
author | Sheogorath | 2019-03-04 17:13:33 +0100 |
---|---|---|
committer | Sheogorath | 2019-03-04 17:13:43 +0100 |
commit | b51a048777ee36bc47d2a23599ad72091197b075 (patch) | |
tree | cb007f99d730d37273651fc8d537efecd7acab24 /lib | |
parent | 32a1afbe86a8c94fd3bcf8374f77aac3bf80d69e (diff) |
Fix wrong value type for HSTS environment variable
Seem like also environment variables are affected. This patch fixes that
as well.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/config/environment.js | 2 | ||||
-rw-r--r-- | lib/config/hackmdEnvironment.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/config/environment.js b/lib/config/environment.js index a57fe0db..fc757cf1 100644 --- a/lib/config/environment.js +++ b/lib/config/environment.js @@ -14,7 +14,7 @@ module.exports = { useSSL: toBooleanConfig(process.env.CMD_USESSL), hsts: { enable: toBooleanConfig(process.env.CMD_HSTS_ENABLE), - maxAgeSeconds: process.env.CMD_HSTS_MAX_AGE, + maxAgeSeconds: toIntegerConfig(process.env.CMD_HSTS_MAX_AGE), includeSubdomains: toBooleanConfig(process.env.CMD_HSTS_INCLUDE_SUBDOMAINS), preload: toBooleanConfig(process.env.CMD_HSTS_PRELOAD) }, diff --git a/lib/config/hackmdEnvironment.js b/lib/config/hackmdEnvironment.js index e1c11569..bc20e58a 100644 --- a/lib/config/hackmdEnvironment.js +++ b/lib/config/hackmdEnvironment.js @@ -10,7 +10,7 @@ module.exports = { useSSL: toBooleanConfig(process.env.HMD_USESSL), hsts: { enable: toBooleanConfig(process.env.HMD_HSTS_ENABLE), - maxAgeSeconds: process.env.HMD_HSTS_MAX_AGE, + maxAgeSeconds: toIntegerConfig(process.env.HMD_HSTS_MAX_AGE), includeSubdomains: toBooleanConfig(process.env.HMD_HSTS_INCLUDE_SUBDOMAINS), preload: toBooleanConfig(process.env.HMD_HSTS_PRELOAD) }, |