mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-14 06:46:27 +03:00
caddyhttp: Fix nil pointer dereference
This commit is contained in:
parent
813fff0584
commit
d803561212
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
if err != nil {
|
||||
// prepare the error log
|
||||
logger := errLog
|
||||
if s.Logs.LoggerNames != nil {
|
||||
if s.Logs != nil && s.Logs.LoggerNames != nil {
|
||||
logger = logger.Named(s.Logs.LoggerNames[r.Host])
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue