mirror of
https://github.com/rancher/dynamiclistener.git
synced 2025-07-16 23:51:32 +00:00
For web browser based requests do not consider IPs in host headers
This commit is contained in:
parent
111c5b43e9
commit
7e3fc0c594
@ -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)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user