mirror of https://github.com/mpolden/echoip
Explaining why userAgent is not cached
This commit is contained in:
parent
ac61080a6e
commit
55152086f3
|
@ -111,6 +111,7 @@ func (s *Server) newResponse(r *http.Request) (Response, error) {
|
||||||
}
|
}
|
||||||
response, ok := s.cache.Get(ip)
|
response, ok := s.cache.Get(ip)
|
||||||
if ok {
|
if ok {
|
||||||
|
// Not Caching the userAgent as it can vary for a given IP
|
||||||
response.UserAgent = userAgentFromRequest(r)
|
response.UserAgent = userAgentFromRequest(r)
|
||||||
return *response, nil
|
return *response, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue