From 86d9a14c5c6be7a5d967667a6ca8e9460c37686c Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 16 Feb 2021 23:51:29 -0800 Subject: [PATCH] fix: is virtual host --- server/utils/s3.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/utils/s3.js b/server/utils/s3.js index 61c78cb92..7cb294a01 100644 --- a/server/utils/s3.js +++ b/server/utils/s3.js @@ -17,7 +17,11 @@ const s3 = new AWS.S3({ accessKeyId: AWS_ACCESS_KEY_ID, secretAccessKey: AWS_SECRET_ACCESS_KEY, region: AWS_REGION, - endpoint: new AWS.Endpoint(process.env.AWS_S3_UPLOAD_BUCKET_URL), + endpoint: process.env.AWS_S3_UPLOAD_BUCKET_URL.includes( + AWS_S3_UPLOAD_BUCKET_NAME + ) + ? undefined + : new AWS.Endpoint(process.env.AWS_S3_UPLOAD_BUCKET_URL), signatureVersion: "v4", });