mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-24 06:26:17 +01:00
agent: include ip in container port if not 0.0.0.0 or ::
This commit is contained in:
@@ -368,6 +368,12 @@ func convertContainerPortsToString(ctr *container.ApiInfo) string {
|
||||
if builder.Len() > 0 {
|
||||
builder.WriteString(", ")
|
||||
}
|
||||
switch p.IP {
|
||||
case "0.0.0.0", "::":
|
||||
default:
|
||||
builder.WriteString(p.IP)
|
||||
builder.WriteByte(':')
|
||||
}
|
||||
builder.WriteString(strconv.Itoa(int(p.PublicPort)))
|
||||
}
|
||||
// clear ports slice so it doesn't get reused and blend into next response
|
||||
|
||||
Reference in New Issue
Block a user