|
|
@@ -69,11 +69,8 @@ public class RequestProtectorAppConfigDriver extends AppConfigDriverBase { |
|
|
|
if (empty(regex)) throw invalidEx("err.requestProtector.headerRegexRequired"); |
|
|
|
|
|
|
|
final JsonNode replacementNode = data.get(PARAM_REPLACEMENT); |
|
|
|
if (replacementNode == null || replacementNode.textValue() == null) { |
|
|
|
throw invalidEx("err.requestProtector.headerReplacementRequired"); |
|
|
|
} |
|
|
|
final String replacement = replacementNode.textValue().trim(); |
|
|
|
if (empty(replacement)) throw invalidEx("err.requestProtector.headerReplacementRequired"); |
|
|
|
final String replacement = (replacementNode == null || replacementNode.textValue() == null) |
|
|
|
? "" : replacementNode.textValue().trim(); |
|
|
|
|
|
|
|
final RequestProtectorConfig config = getConfig(account, app).addHeaderReplacement(regex, replacement); |
|
|
|
|
|
|
|