summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/httptype.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-01-19 11:51:17 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-01-19 11:51:17 -0700
commitaad9f90cad23d709075073fd59214a51249de386 (patch)
treee0283a010e379fd84e2f0af425ebc79afec637db /caddyconfig/httpcaddyfile/httptype.go
parent07ef4b0c7db356bfc1d334187c0920f85aa416f3 (diff)
httpcaddyfile: Fix address parsing; don't infer port at parse-time
Before, listener ports could be wrong because ParseAddress doesn't know about the user-configured HTTP/HTTPS ports, instead hard-coding port 80 or 443, which could be wrong if the user changed them to something else. Now we defer port and scheme validation/inference to a later part of building the output JSON.
Diffstat (limited to 'caddyconfig/httpcaddyfile/httptype.go')
-rw-r--r--caddyconfig/httpcaddyfile/httptype.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go
index a57b6e9..20621bb 100644
--- a/caddyconfig/httpcaddyfile/httptype.go
+++ b/caddyconfig/httpcaddyfile/httptype.go
@@ -159,7 +159,7 @@ func (st ServerType) Setup(originalServerBlocks []caddyfile.ServerBlock,
}
// map
- sbmap, err := st.mapAddressToServerBlocks(serverBlocks)
+ sbmap, err := st.mapAddressToServerBlocks(serverBlocks, options)
if err != nil {
return nil, warnings, err
}