1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-30 17:47:28 +01:00

feat: Adding debug log when host-specific certificate path not found (#2948)

This commit is contained in:
Freddy Grande
2024-05-12 22:56:52 +10:00
committed by GitHub
parent bc1a5fbc8b
commit 8433f89bd2

View File

@@ -2,11 +2,12 @@ package docker
import (
"fmt"
"log"
"net/url"
"os"
"path/filepath"
"strings"
log "github.com/sirupsen/logrus"
)
type Host struct {
@@ -49,6 +50,8 @@ func ParseConnection(connection string) (Host, error) {
host := remoteUrl.Hostname()
if _, err := os.Stat(filepath.Join(basePath, host)); !os.IsNotExist(err) {
basePath = filepath.Join(basePath, host)
} else {
log.Debugf("Remote host certificate path does not exist %s, falling back to default: %s", filepath.Join(basePath, host), basePath)
}
cacertPath := filepath.Join(basePath, "ca.pem")