diff --git a/src/storage/s3.js b/src/storage/s3.js index 05191099d..c7dff23d8 100644 --- a/src/storage/s3.js +++ b/src/storage/s3.js @@ -108,7 +108,7 @@ function getS3Config(apiConfig, callback) { if (apiConfig.endpoint) credentials.endpoint = apiConfig.endpoint; - if (apiConfig.acceptSelfSignedCerts === true) { + if (apiConfig.acceptSelfSignedCerts === true && credentials.endpoint && credentials.endpoint.startsWith('https://')) { credentials.httpOptions.agent = { agent: new https.Agent({ rejectUnauthorized: false }) };