Skip to content

Commit

Permalink
Fix opt.s3.fakes3 parsing issue (#1318)
Browse files Browse the repository at this point in the history
* Fix opt.s3.fakes3 parsing issue

* Fix second typo within if block
  • Loading branch information
ritchia1 authored May 12, 2023
1 parent b14d5da commit 0cb9706
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rs3.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ Gun.on('create', function(root){
opts.accessKeyId = opts.key = opts.key || opts.accessKeyId || process.env.AWS_ACCESS_KEY_ID;
opts.secretAccessKey = opts.secret = opts.secret || opts.secretAccessKey || process.env.AWS_SECRET_ACCESS_KEY;

if(opt.fakes3 = opt.fakes3 || process.env.fakes3){
opts.endpoint = opt.fakes3;
// opts.fakes3 should be the domain name of the S3-compatible service
if(opts.fakes3 = opts.fakes3 || process.env.fakes3){
opts.endpoint = opts.fakes3;
opts.sslEnabled = false;
opts.bucket = opts.bucket.replace('.','p');
}
Expand Down

0 comments on commit 0cb9706

Please sign in to comment.