diff options
| author | Will Norris <will@tailscale.com> | 2023-11-03 14:46:53 -0700 |
|---|---|---|
| committer | Will Norris <will@willnorris.com> | 2023-11-03 14:55:16 -0700 |
| commit | a05ab9f3bcd9aff4ffd42ef0d38a3f765b7068f9 (patch) | |
| tree | 9489e024fd0b20a3268b09e7668eec9c6e783335 | |
| parent | 6b956b49e029ecc500bfae96a3175a6b4db4811d (diff) | |
| download | tailscale-a05ab9f3bcd9aff4ffd42ef0d38a3f765b7068f9.tar.xz tailscale-a05ab9f3bcd9aff4ffd42ef0d38a3f765b7068f9.zip | |
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>
| -rw-r--r-- | client/web/web.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/web/web.go b/client/web/web.go index 518bc151c..e5f754a4e 100644 --- a/client/web/web.go +++ b/client/web/web.go @@ -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 } |
