aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/addresses.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-03-17 21:00:45 -0600
committerMatthew Holt <[email protected]>2020-03-17 21:00:45 -0600
commitfc7340e11aa9ca6326909aedfd36bb2c5b53d2a8 (patch)
treeb057f7368a355192bdb40784b6d95716982e6923 /caddyconfig/httpcaddyfile/addresses.go
parent3f48a2eb455167af8d77c5c4543bd17a80a93260 (diff)
downloadcaddy-fc7340e11aa9ca6326909aedfd36bb2c5b53d2a8.tar.gz
caddy-fc7340e11aa9ca6326909aedfd36bb2c5b53d2a8.zip
httpcaddyfile: Many tls-related improvements including on-demand support
Holy heck this was complicated
Diffstat (limited to 'caddyconfig/httpcaddyfile/addresses.go')
-rw-r--r--caddyconfig/httpcaddyfile/addresses.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/caddyconfig/httpcaddyfile/addresses.go b/caddyconfig/httpcaddyfile/addresses.go
index 2d1783365..4dad166de 100644
--- a/caddyconfig/httpcaddyfile/addresses.go
+++ b/caddyconfig/httpcaddyfile/addresses.go
@@ -274,8 +274,6 @@ func ParseAddress(str string) (Address, error) {
return a, nil
}
-// TODO: which of the methods on Address are even used?
-
// String returns a human-readable form of a. It will
// be a cleaned-up and filled-out URL string.
func (a Address) String() string {
@@ -312,7 +310,7 @@ func (a Address) Normalize() Address {
path := a.Path
// ensure host is normalized if it's an IP address
- host := a.Host
+ host := strings.TrimSpace(a.Host)
if ip := net.ParseIP(host); ip != nil {
host = ip.String()
}