mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
Merge pull request #1362 from Deyvi-dev/develop
feat(s3): add S3_SKIP_POLICY env variable to disable setBucketPolicy
This commit is contained in:
commit
09f79c94be
@ -63,9 +63,9 @@ const createBucket = async () => {
|
||||
if (!exists) {
|
||||
await minioClient.makeBucket(bucketName);
|
||||
}
|
||||
|
||||
await setBucketPolicy();
|
||||
|
||||
if (!BUCKET.SKIP_POLICY) {
|
||||
await setBucketPolicy();
|
||||
}
|
||||
logger.info(`S3 Bucket ${bucketName} - ON`);
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
@ -263,6 +263,7 @@ export type S3 = {
|
||||
PORT?: number;
|
||||
USE_SSL?: boolean;
|
||||
REGION?: string;
|
||||
SKIP_POLICY?: boolean;
|
||||
};
|
||||
|
||||
export type CacheConf = { REDIS: CacheConfRedis; LOCAL: CacheConfLocal };
|
||||
@ -608,6 +609,7 @@ export class ConfigService {
|
||||
PORT: Number.parseInt(process.env?.S3_PORT || '9000'),
|
||||
USE_SSL: process.env?.S3_USE_SSL === 'true',
|
||||
REGION: process.env?.S3_REGION,
|
||||
SKIP_POLICY: process.env?.S3_SKIP_POLICY === 'true',
|
||||
},
|
||||
AUTHENTICATION: {
|
||||
API_KEY: {
|
||||
|
Loading…
Reference in New Issue
Block a user