mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-31 21:50:46 +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 {
|
if err != nil {
|
||||||
// prepare the error log
|
// prepare the error log
|
||||||
logger := errLog
|
logger := errLog
|
||||||
if s.Logs.LoggerNames != nil {
|
if s.Logs != nil && s.Logs.LoggerNames != nil {
|
||||||
logger = logger.Named(s.Logs.LoggerNames[r.Host])
|
logger = logger.Named(s.Logs.LoggerNames[r.Host])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user