For web browser based requests do not consider IPs in host headers

This commit is contained in:
Darren Shepherd 2020-03-14 10:16:11 -07:00
parent 111c5b43e9
commit 7e3fc0c594

View File

@ -337,6 +337,12 @@ func (l *listener) cacheHandler() http.Handler {
ip := net.ParseIP(h)
if len(ip) > 0 {
for _, v := range req.Header["User-Agent"] {
if strings.Contains(strings.ToLower(v), "mozilla") {
return
}
}
l.updateCert(h)
}
})