Skip to content

Commit b51a048

Browse files
committed
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>
1 parent 32a1afb commit b51a048

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
useSSL: toBooleanConfig(process.env.CMD_USESSL),
1515
hsts: {
1616
enable: toBooleanConfig(process.env.CMD_HSTS_ENABLE),
17-
maxAgeSeconds: process.env.CMD_HSTS_MAX_AGE,
17+
maxAgeSeconds: toIntegerConfig(process.env.CMD_HSTS_MAX_AGE),
1818
includeSubdomains: toBooleanConfig(process.env.CMD_HSTS_INCLUDE_SUBDOMAINS),
1919
preload: toBooleanConfig(process.env.CMD_HSTS_PRELOAD)
2020
},

lib/config/hackmdEnvironment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
useSSL: toBooleanConfig(process.env.HMD_USESSL),
1111
hsts: {
1212
enable: toBooleanConfig(process.env.HMD_HSTS_ENABLE),
13-
maxAgeSeconds: process.env.HMD_HSTS_MAX_AGE,
13+
maxAgeSeconds: toIntegerConfig(process.env.HMD_HSTS_MAX_AGE),
1414
includeSubdomains: toBooleanConfig(process.env.HMD_HSTS_INCLUDE_SUBDOMAINS),
1515
preload: toBooleanConfig(process.env.HMD_HSTS_PRELOAD)
1616
},

0 commit comments

Comments
 (0)