Skip to content

Commit

Permalink
fix(config): move ssl env logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Svetlichny authored and NatalieWolfe committed Mar 6, 2018
1 parent 46ba329 commit 89ebd8f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,11 +1054,6 @@ Config.prototype._fromEnvironment = function _fromEnvironment(metadata, data) {
return
}

if (value === 'ssl' && !isTruthular(metadata.ssl)) {
logger.warn('SSL config key can no longer be disabled, not updating.')
return
}

var node = metadata[value]
if (typeof node === 'string') {
var setting = process.env[node]
Expand All @@ -1070,6 +1065,10 @@ Config.prototype._fromEnvironment = function _fromEnvironment(metadata, data) {
} else if (OBJECT_LIST_VARS.indexOf(node) > -1) {
data[value] = fromObjectList(setting)
} else if (BOOLEAN_VARS.indexOf(node) > -1) {
if (value === 'ssl' && !isTruthular(setting)) {
logger.warn('SSL config key can no longer be disabled, not updating.')
return
}
data[value] = isTruthular(setting)
} else if (FLOAT_VARS.indexOf(node) > -1) {
data[value] = parseFloat(setting, 10)
Expand Down

0 comments on commit 89ebd8f

Please sign in to comment.