mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
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>
This commit is contained in:
parent
6b956b49e0
commit
a05ab9f3bc
@ -261,7 +261,7 @@ func (s *Server) requireTailscaleIP(w http.ResponseWriter, r *http.Request) (han
|
|||||||
ipv6ServiceHost = "[" + tsaddr.TailscaleServiceIPv6String + "]"
|
ipv6ServiceHost = "[" + tsaddr.TailscaleServiceIPv6String + "]"
|
||||||
)
|
)
|
||||||
// allow requests on quad-100 (or ipv6 equivalent)
|
// 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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user