From b0ce64a1c650a105b34d335d112207a22d2034b4 Mon Sep 17 00:00:00 2001 From: EduardoGomes Date: Tue, 20 Jun 2023 11:48:38 +0100 Subject: [PATCH] AUTH-5328 Pass cloudflared_token_check param when running cloudflared access login --- cmd/cloudflared/access/cmd.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/cloudflared/access/cmd.go b/cmd/cloudflared/access/cmd.go index 687e0165..07b6dc2f 100644 --- a/cmd/cloudflared/access/cmd.go +++ b/cmd/cloudflared/access/cmd.go @@ -525,6 +525,11 @@ func isTokenValid(options *carrier.StartOptions, log *zerolog.Logger) (bool, err return false, errors.Wrap(err, "Could not create access request") } req.Header.Set("User-Agent", userAgent) + + query := req.URL.Query() + query.Set("cloudflared_token_check", "true") + req.URL.RawQuery = query.Encode() + // Do not follow redirects client := &http.Client{ CheckRedirect: func(req *http.Request, via []*http.Request) error {