From e70f31baeae332b8ea5a9392506bba9ec776b02b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20B=C3=B6ttge?= Date: Thu, 5 Oct 2023 11:56:25 +0200 Subject: [PATCH] All: Enable ignoreTlsErrors and custom certificates for S3 sync (#8980) --- packages/lib/SyncTargetAmazonS3.js | 2 ++ packages/lib/models/Setting.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/lib/SyncTargetAmazonS3.js b/packages/lib/SyncTargetAmazonS3.js index 729e40e4f..c9b045418 100644 --- a/packages/lib/SyncTargetAmazonS3.js +++ b/packages/lib/SyncTargetAmazonS3.js @@ -56,6 +56,7 @@ class SyncTargetAmazonS3 extends BaseSyncTarget { UseArnRegion: true, // override the request region with the region inferred from requested resource's ARN. forcePathStyle: Setting.value('sync.8.forcePathStyle'), // Older implementations may not support more modern access, so we expose this to allow people the option to toggle. endpoint: Setting.value('sync.8.url'), + ignoreTlsErrors: Setting.value('net.ignoreTlsErrors'), }; } @@ -87,6 +88,7 @@ class SyncTargetAmazonS3 extends BaseSyncTarget { UseArnRegion: true, // override the request region with the region inferred from requested resource's ARN. forcePathStyle: options.forcePathStyle(), endpoint: options.url(), + ignoreTlsErrors: options.ignoreTlsErrors(), }; const api = new S3Client(apiOptions); diff --git a/packages/lib/models/Setting.ts b/packages/lib/models/Setting.ts index b0cfa979f..90adb4137 100644 --- a/packages/lib/models/Setting.ts +++ b/packages/lib/models/Setting.ts @@ -1498,6 +1498,7 @@ class Setting extends BaseModel { advanced: true, show: (settings: any) => { return [ + SyncTargetRegistry.nameToId('amazon_s3'), SyncTargetRegistry.nameToId('nextcloud'), SyncTargetRegistry.nameToId('webdav'), SyncTargetRegistry.nameToId('joplinServer'), @@ -1517,6 +1518,7 @@ class Setting extends BaseModel { show: (settings: any) => { return (shim.isNode() || shim.mobilePlatform() === 'android') && [ + SyncTargetRegistry.nameToId('amazon_s3'), SyncTargetRegistry.nameToId('nextcloud'), SyncTargetRegistry.nameToId('webdav'), SyncTargetRegistry.nameToId('joplinServer'),