From f7b5187bf323c7a6e3cb71a0a124c09e0f6158d3 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 19 Feb 2016 13:34:54 -0700 Subject: [PATCH] server: Add "Referer" to log entry when host not found --- server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index 963692fe7..3a336f3b0 100644 --- a/server/server.go +++ b/server/server.go @@ -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")) } }