client/web: check r.Host rather than r.URL.Host

r.URL.Host is not typically populated on server requests.

Updates tailscale/corp#14335

Signed-off-by: Will Norris <will@tailscale.com>
pull/10115/head
Will Norris 1 year ago committed by Will Norris
parent 6b956b49e0
commit a05ab9f3bc

@ -261,7 +261,7 @@ func (s *Server) requireTailscaleIP(w http.ResponseWriter, r *http.Request) (han
ipv6ServiceHost = "[" + tsaddr.TailscaleServiceIPv6String + "]"
)
// allow requests on quad-100 (or ipv6 equivalent)
if r.URL.Host == ipv4ServiceHost || r.URL.Host == ipv6ServiceHost {
if r.Host == ipv4ServiceHost || r.Host == ipv6ServiceHost {
return false
}

Loading…
Cancel
Save