From 05c3c4c7b2de9738e07413dc1e3488dea3df18e5 Mon Sep 17 00:00:00 2001 From: Steeve Payraudeau <16964532+steevepay@users.noreply.github.com> Date: Mon, 29 Apr 2024 21:04:21 +0400 Subject: [PATCH] Fix AWS environment variables --- CHANGELOG.md | 4 ++++ config.js | 4 ++-- test/config.js | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61c8c05..b8b05db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.3.0 +- Released the 2024/04/29 +- Fixed S3 Credential as Environment Variable + ## 1.2.1 - Released the 2024/04/24 - Fixed: if S3 credentials are missing, the plugin is not stopping the Carbone server process anymore. diff --git a/config.js b/config.js index 4436cd8..5d797ef 100644 --- a/config.js +++ b/config.js @@ -16,8 +16,8 @@ function getConfig () { } if (process?.env?.AWS_SECRET_ACCESS_KEY && process?.env?.AWS_ACCESS_KEY_ID && process?.env?.AWS_ENDPOINT_URL && process?.env?.AWS_REGION) { config.storageCredentials = { - accessKeyId: process.env.AWS_SECRET_ACCESS_KEY, - secretAccessKey: process.env.AWS_ACCESS_KEY_ID, + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, url: process.env.AWS_ENDPOINT_URL, region: process.env.AWS_REGION } diff --git a/test/config.js b/test/config.js index 02465df..9cabe0b 100644 --- a/test/config.js +++ b/test/config.js @@ -42,8 +42,8 @@ describe('Config', function () { it('should provide configurations as environment variables', function (done) { config.setConfig(null); - process.env.AWS_SECRET_ACCESS_KEY = 'accessKeyId2'; - process.env.AWS_ACCESS_KEY_ID = 'secretAccessKey1'; + process.env.AWS_ACCESS_KEY_ID = 'accessKeyId2'; + process.env.AWS_SECRET_ACCESS_KEY = 'secretAccessKey1'; process.env.AWS_ENDPOINT_URL = 's3.us-east-1.first.cloud.test'; process.env.AWS_REGION = 'us-east-1'; process.env.BUCKET_RENDERS = 'rendersBucket2';