From 55152086f3af3e4d485670e7d5dd815704acf6ef Mon Sep 17 00:00:00 2001 From: Richard Finlay Tweed Date: Sun, 7 Jun 2020 13:17:23 +0100 Subject: [PATCH] Explaining why userAgent is not cached --- http/http.go | 1 + 1 file changed, 1 insertion(+) diff --git a/http/http.go b/http/http.go index b483c01..7c9263a 100644 --- a/http/http.go +++ b/http/http.go @@ -111,6 +111,7 @@ func (s *Server) newResponse(r *http.Request) (Response, error) { } response, ok := s.cache.Get(ip) if ok { + // Not Caching the userAgent as it can vary for a given IP response.UserAgent = userAgentFromRequest(r) return *response, nil }