Skip to content

Commit 87ba625

Browse files
committed
Remove checks for protocol before removing port
Signed-off-by: Thor77 <thor77@thor77.org>
1 parent e928893 commit 87ba625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/imageRouter/minio.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exports.uploadImage = function (imagePath, callback) {
4040
callback(new Error(err), null)
4141
return
4242
}
43-
let hidePort = (protocol === 'http' && config.minio.port === 80) || (protocol === 'https' && config.minio.port === 443)
43+
let hidePort = [80, 443].includes(config.minio.port)
4444
let urlPort = hidePort ? '' : `:${config.minio.port}`
4545
callback(null, `${protocol}://${config.minio.endPoint}${urlPort}/${config.s3bucket}/${key}`)
4646
})

0 commit comments

Comments
 (0)