Merge pull request #19 from ibuildthecloud/master

For web browser based requests do not consider IPs in host headers
This commit is contained in:
Darren Shepherd 2020-03-14 10:17:03 -07:00 committed by GitHub
commit 1e67d402dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}
})