add protocol prefix to s3-based endpoint

cycling-live-grid
Moe 2023-04-06 12:10:38 -07:00
parent a9ad989873
commit f6c34befa2
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ module.exports = function(s,config,lang){
if(!userDetails.whcs_endpoint ){
userDetails.whcs_endpoint = 's3.wasabisys.com'
}
if(userDetails.whcs_endpoint.indexOf('://') === -1){
userDetails.whcs_endpoint = `https://${userDetails.whcs_endpoint}`
}
s.group[e.ke].whcs = new S3Client({
endpoint: userDetails.whcs_endpoint,
credentials: {