From 65fac143f697337f3eee2b3b83e7c4419eefc71c Mon Sep 17 00:00:00 2001 From: Matej Cotman Date: Wed, 4 Aug 2021 16:04:07 +0300 Subject: [PATCH] fix(s3): replace dash with dot for s3 endpoint According to the AWS documentation there is no situation that there is a dash in `s3-.amazonaws.com`, the correct way is with a dot `s3..amazonaws.com` Source: https://docs.aws.amazon.com/general/latest/gr/s3.html Signed-off-by: Matej Cotman --- lib/web/imageRouter/s3.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/web/imageRouter/s3.js b/lib/web/imageRouter/s3.js index 5bb8e160e..92f225af8 100644 --- a/lib/web/imageRouter/s3.js +++ b/lib/web/imageRouter/s3.js @@ -46,7 +46,7 @@ exports.uploadImage = function (imagePath, callback) { if (config.s3.endpoint) { s3Endpoint = config.s3.endpoint } else if (config.s3.region && config.s3.region !== 'us-east-1') { - s3Endpoint = `s3-${config.s3.region}.amazonaws.com` + s3Endpoint = `s3.${config.s3.region}.amazonaws.com` } callback(null, `https://${s3Endpoint}/${config.s3bucket}/${params.Key}`) })