diff --git a/client-templates/artifactory/.env.sample b/client-templates/artifactory/.env.sample index 714bcf01d..d02992fec 100644 --- a/client-templates/artifactory/.env.sample +++ b/client-templates/artifactory/.env.sample @@ -21,3 +21,4 @@ RES_BODY_URL_SUB=http:///artifactory # Artifactory validation url, checked by broker client systemcheck endpoint BROKER_CLIENT_VALIDATION_URL=https://$ARTIFACTORY_URL/api/system/ping +BROKER_CLIENT_VALIDATION_JSON_DISABLED=true diff --git a/lib/client/index.js b/lib/client/index.js index af0807097..94ad207b9 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -49,6 +49,7 @@ module.exports = ({ port = null, config = {}, filters = {} }) => { config.brokerClientValidationMethod || 'GET'; const brokerClientValidationTimeoutMs = config.brokerClientValidationTimeoutMs || 5000; + const isJsonResponse = !config.brokerClientValidationJsonDisabled; const data = { brokerClientValidationUrl: logger.sanitise( @@ -79,7 +80,7 @@ module.exports = ({ port = null, config = {}, filters = {} }) => { headers: validationRequestHeaders, method: brokerClientValidationMethod, timeout: brokerClientValidationTimeoutMs, - json: true, + json: isJsonResponse, agentOptions: { ca: config.caCert, // Optional CA cert },