Skip to content

Commit

Permalink
Merge pull request #301 from snyk/fix/artifactory-systemcheck
Browse files Browse the repository at this point in the history
fix: artifactory systmecheck endpoint
  • Loading branch information
Albert Kogan authored Dec 30, 2020
2 parents f34c1fe + 8bb8524 commit 936bfa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions client-templates/artifactory/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ RES_BODY_URL_SUB=http://<yourdomain.artifactory.com>/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
3 changes: 2 additions & 1 deletion lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
},
Expand Down

0 comments on commit 936bfa3

Please sign in to comment.