mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-25 00:46:07 -04:00
httpserver: Fix address display and routing for IPv6 IPs/wildcards
This commit is contained in:
@@ -428,11 +428,12 @@ func (a Address) String() string {
|
||||
if s != "" {
|
||||
s += "://"
|
||||
}
|
||||
s += a.Host
|
||||
if a.Port != "" &&
|
||||
((scheme == "https" && a.Port != DefaultHTTPSPort) ||
|
||||
(scheme == "http" && a.Port != DefaultHTTPPort)) {
|
||||
s += ":" + a.Port
|
||||
s += net.JoinHostPort(a.Host, a.Port)
|
||||
} else {
|
||||
s += a.Host
|
||||
}
|
||||
if a.Path != "" {
|
||||
s += a.Path
|
||||
|
||||
Reference in New Issue
Block a user