Skip to content

Commit

Permalink
fix: hardcode s3 region (#1000)
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan authored Sep 24, 2024
1 parent ff269ff commit 9e04361
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/helix-shared-storage/src/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export class HelixStorage {
*/
constructor(opts = {}) {
const {
region, accessKeyId, secretAccessKey,
region = 'us-east-1', accessKeyId, secretAccessKey,
connectionTimeout, socketTimeout,
r2AccountId, r2AccessKeyId, r2SecretAccessKey,
log = console,
Expand All @@ -662,6 +662,7 @@ export class HelixStorage {
} else {
log.debug('Creating S3Client without credentials');
this._s3 = new S3Client({
region,
requestHandler: new NodeHttpHandler({
httpsAgent: new Agent({
keepAlive,
Expand Down
4 changes: 3 additions & 1 deletion packages/helix-shared-tokencache/src/S3CacheManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export class S3CacheManager {
this.secret = opts.secret;
this.readOnly = opts.readOnly;
this.type = opts.type;
this.s3 = new S3Client();
this.s3 = new S3Client({
region: 'us-east-1',
});
}

getAuthObjectKey(key) {
Expand Down
4 changes: 3 additions & 1 deletion packages/helix-shared-tokencache/src/S3CachePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class S3CachePlugin {
this.secret = opts.secret;
this.readOnly = opts.readOnly || false;
this.type = opts.type;
this.s3 = new S3Client();
this.s3 = new S3Client({
region: 'us-east-1',
});
this.meta = null;
this.data = null;
}
Expand Down

0 comments on commit 9e04361

Please sign in to comment.