Client ignore bad certs cause home is dumb

master
bel 2019-10-20 17:33:38 -06:00
parent cff3290abb
commit cc41444b21
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package oauth2client
import (
"crypto/tls"
"errors"
"local/oauth2"
"net/http"
@ -83,6 +84,9 @@ func verify(access string, oauth2server *url.URL, w http.ResponseWriter, r *http
req.Header.Add("Content-Length", strconv.Itoa(len(data.Encode())))
c := &http.Client{
Timeout: 5 * time.Second,
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
},
}
resp, err := c.Do(req)
if err != nil {