summaryrefslogtreecommitdiff
path: root/caddyconfig/httpcaddyfile/tlsapp.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-30 18:39:21 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-30 18:39:21 -0600
commit904d9cab390007610a65f648d05314f5826c3979 (patch)
tree68cc3dbf030ec17f1ee205b20253495ddd519ba8 /caddyconfig/httpcaddyfile/tlsapp.go
parentac65f690ae9dee3ab6d3c634cffd0b41252cb343 (diff)
httpcaddyfile: Include non-standard ports when mapping logger names
If a site block has a key like "http://localhost:2016", then the log for that site must be mapped to "localhost:2016" and not just "localhost" because "localhost:2016" will be the value of the Host header of requests. But a key like "localhost:80" does not include the port since the Host header will not include ":80" because it is a standard port. Fixes https://caddy.community/t/v2-common-log-format-not-working/7352?u=matt
Diffstat (limited to 'caddyconfig/httpcaddyfile/tlsapp.go')
-rw-r--r--caddyconfig/httpcaddyfile/tlsapp.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/tlsapp.go b/caddyconfig/httpcaddyfile/tlsapp.go
index 67a1298..db3d13b 100644
--- a/caddyconfig/httpcaddyfile/tlsapp.go
+++ b/caddyconfig/httpcaddyfile/tlsapp.go
@@ -82,7 +82,7 @@ func (st ServerType) buildTLSApp(
// get values that populate an automation policy for this block
var ap *caddytls.AutomationPolicy
- sblockHosts, err := st.hostsFromServerBlockKeys(sblock.block, false)
+ sblockHosts, err := st.hostsFromServerBlockKeys(sblock.block, false, false)
if err != nil {
return nil, warnings, err
}