mirror of
https://github.com/caddyserver/caddy.git
synced 2025-04-23 13:14:08 +08:00
caddyhttp: Fix nil pointer dereference
This commit is contained in:
parent
813fff0584
commit
d803561212
@ -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…
x
Reference in New Issue
Block a user