diff --git a/cmd/nginx-auth/nginx-auth.go b/cmd/nginx-auth/nginx-auth.go index ee55ca74f..53dcb9596 100644 --- a/cmd/nginx-auth/nginx-auth.go +++ b/cmd/nginx-auth/nginx-auth.go @@ -75,12 +75,7 @@ func main() { log.Printf("can't extract tailnet name from hostname %q", info.Node.Name) return } - tailnet, _, ok = strings.Cut(tailnet, ".beta.tailscale.net") - if !ok { - w.WriteHeader(http.StatusUnauthorized) - log.Printf("can't extract tailnet name from hostname %q", info.Node.Name) - return - } + tailnet = strings.TrimSuffix(tailnet, ".beta.tailscale.net") } if expectedTailnet := r.Header.Get("Expected-Tailnet"); expectedTailnet != "" && expectedTailnet != tailnet {