From 20bace6e9a895876d65faa0016b516ca2a776966 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Tue, 19 Nov 2019 10:04:22 +0100 Subject: [PATCH] Undo changes to validation --- validation.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/validation.go b/validation.go index 73ece0b..976143b 100644 --- a/validation.go +++ b/validation.go @@ -34,6 +34,7 @@ func checkAccess(token string) (bool, error) { return false, errors.New("token string is empty") } // form the request to check the token + client := &http.Client{} req, err := http.NewRequest("GET", indieAuthTokenUrl, nil) if err != nil { return false, errors.New("error making the request for checking token access") @@ -41,7 +42,7 @@ func checkAccess(token string) (bool, error) { req.Header.Set("Accept", "application/json") req.Header.Set("Authorization", token) // send the request - res, err := http.Client{}.Do(req) + res, err := client.Do(req) if err != nil { return false, errors.New("error sending the request for checking token access") }