Skip to content

Commit 85817f5

Browse files
committed
fix(backup): [s3] use secure depends on endpoint url #1266
1 parent dfebb8b commit 85817f5

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

api/analytic/nodes.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ func GetNodeStat(c *gin.Context) {
6565
NodeInfo: nodeInfo,
6666
NodeStat: stat,
6767
}
68-
69-
logger.Debugf("Sending complete node info including version: %s", ver.Version)
7068
}
7169
} else {
7270
// Send only stat information for performance

app/src/components/ProxyTargets/ProxyTargets.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ function getTargetText(target: ProxyTarget): string {
2323
return `${target.host}:${target.port}`
2424
2525
if (result.online) {
26-
return `${target.host}:${target.port} (${result.latency.toFixed(2)}ms)`
26+
return `${target.host}:${target.port} · ${result.latency.toFixed(2)}ms`
2727
}
2828
else {
29-
return `${target.host}:${target.port} (${$gettext('Offline')})`
29+
return `${target.host}:${target.port} · ${$gettext('Offline')}`
3030
}
3131
}
3232

internal/backup/s3_client.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@ func NewS3Client(autoBackup *model.AutoBackup) (*S3Client, error) {
3838
endpoint = "s3.amazonaws.com"
3939
}
4040

41+
var secure bool
42+
if strings.HasPrefix(endpoint, "https://") {
43+
secure = true
44+
}
45+
4146
// Remove protocol prefix if present
4247
endpoint = strings.ReplaceAll(endpoint, "https://", "")
4348
endpoint = strings.ReplaceAll(endpoint, "http://", "")
4449

4550
// Initialize MinIO client
4651
minioClient, err := minio.New(endpoint, &minio.Options{
4752
Creds: credentials.NewStaticV4(autoBackup.S3AccessKeyID, autoBackup.S3SecretAccessKey, ""),
48-
Secure: true, // Use SSL by default
53+
Secure: secure,
4954
Region: getS3Region(autoBackup.S3Region),
5055
})
5156
if err != nil {

0 commit comments

Comments
 (0)