summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/caddyhttp.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-10-31 11:45:18 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-10-31 11:45:18 -0600
commitfb06c041c4be4eb32f18d54e8e7feff8dd76b0e9 (patch)
treeb7b2a3d93ec55dfdcceb5e3ecc321f4a5055782f /modules/caddyhttp/caddyhttp.go
parent8ef0a0b4f8968fd1952449f9068e66486f40964c (diff)
http: Ensure server loggers are not nil (fixes #2849)
Diffstat (limited to 'modules/caddyhttp/caddyhttp.go')
-rw-r--r--modules/caddyhttp/caddyhttp.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go
index aae65ab..1f16339 100644
--- a/modules/caddyhttp/caddyhttp.go
+++ b/modules/caddyhttp/caddyhttp.go
@@ -479,9 +479,11 @@ func (app *App) automaticHTTPS() error {
// rest of the redirects
if len(redirServerAddrs) > 0 {
app.Servers["remaining_auto_https_redirects"] = &Server{
- Listen: redirServerAddrs,
- Routes: redirRoutes,
- tlsApp: tlsApp, // required to solve HTTP challenge
+ Listen: redirServerAddrs,
+ Routes: redirRoutes,
+ tlsApp: tlsApp, // required to solve HTTP challenge
+ logger: app.logger.Named("log"),
+ errorLogger: app.logger.Named("log.error"),
}
}
}