Skip to content

Commit 9d78ba3

Browse files
authored
regression: prevent S3 region empty string from blocking env var fallback (RocketChat#39711)
1 parent 2e6441e commit 9d78ba3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/meteor/app/file-upload/server/config/AmazonS3.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ const configure = _.debounce(() => {
8181
const config: Omit<S3Options, 'name' | 'getPath'> = {
8282
connection: {
8383
forcePathStyle: ForcePathStyle,
84-
region: Region,
8584
followRegionRedirects: true,
8685
},
8786
params: {
@@ -91,6 +90,10 @@ const configure = _.debounce(() => {
9190
URLExpiryTimeSpan,
9291
};
9392

93+
if (Region) {
94+
config.connection.region = Region;
95+
}
96+
9497
if (AWSAccessKeyId && AWSSecretAccessKey) {
9598
config.connection.credentials = {
9699
accessKeyId: AWSAccessKeyId,

0 commit comments

Comments
 (0)