AUTH-5328 Pass cloudflared_token_check param when running cloudflared access login

This commit is contained in:
EduardoGomes 2023-06-20 11:48:38 +01:00
parent cb4bd8d065
commit 31f424d589
1 changed files with 5 additions and 0 deletions

View File

@ -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 {