From a72f695124401dd37c78ec5ea7248eb57318c7af Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Fri, 14 Apr 2023 10:41:57 +0200 Subject: [PATCH] fix(s3-backend): correct endpoint Signed-off-by: Tilman Vatteroth --- backend/src/media/backends/s3-backend.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/media/backends/s3-backend.ts b/backend/src/media/backends/s3-backend.ts index 5995075f2..1cc464bf3 100644 --- a/backend/src/media/backends/s3-backend.ts +++ b/backend/src/media/backends/s3-backend.ts @@ -29,13 +29,12 @@ export class S3Backend implements MediaBackend { this.config = mediaConfig.backend.s3; const url = new URL(this.config.endPoint); const secure = url.protocol === 'https:'; // url.protocol contains a trailing ':' - const endpoint = `${url.hostname}${url.pathname}`; let port = parseInt(url.port); if (isNaN(port)) { port = secure ? 443 : 80; } this.client = new Client({ - endPoint: endpoint.substr(0, endpoint.length - 1), // remove trailing '/' + endPoint: url.hostname, port: port, useSSL: secure, accessKey: this.config.accessKeyId,