mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-07 11:28:48 +03:00
server: Add "Referer" to log entry when host not found
This commit is contained in:
parent
09a7af8cae
commit
f7b5187bf3
1 changed files with 2 additions and 1 deletions
|
@ -331,7 +331,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
fmt.Fprintf(w, "No such host at %s", s.Server.Addr)
|
||||
log.Printf("[INFO] %s - No such host at %s (requested by %s)", host, s.Server.Addr, remoteHost)
|
||||
log.Printf("[INFO] %s - No such host at %s (Remote: %s, Referer: %s)",
|
||||
host, s.Server.Addr, remoteHost, r.Header.Get("Referer"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue