fix minio2

This commit is contained in:
Arthur Barre 2025-03-16 19:44:18 +01:00
parent fe493fe053
commit 9b98b3c0c6

View File

@ -1,14 +1,17 @@
const Minio = require('minio'); const Minio = require('minio');
const https = require('https');
const minioClient = new Minio.Client({ const minioClient = new Minio.Client({
endPoint: process.env.MINIO_ENDPOINT.replace(/^https?:\/\//, ''), endPoint: process.env.MINIO_ENDPOINT.replace(/^https?:\/\//, ''),
port: parseInt(process.env.MINIO_PORT), port: parseInt(process.env.MINIO_PORT),
useSSL: false, useSSL: process.env.MINIO_USE_SSL === 'true',
accessKey: process.env.MINIO_ACCESS_KEY, accessKey: process.env.MINIO_ACCESS_KEY,
secretKey: process.env.MINIO_SECRET_KEY, secretKey: process.env.MINIO_SECRET_KEY,
pathStyle: true, pathStyle: true,
transport: { transport: {
agent: false, agent: new https.Agent({
rejectUnauthorized: false
})
} }
}); });