mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 02:41:01 +00:00
Merge pull request #1053 from Bugagazavr/patch-2
Fix self-signed certificates for gitlab
This commit is contained in:
commit
be9acc3d67
1 changed files with 7 additions and 1 deletions
|
@ -56,7 +56,13 @@ func (r *Gitlab) Authorize(res http.ResponseWriter, req *http.Request) (*model.L
|
|||
return nil, fmt.Errorf("Error matching state in OAuth2 redirect")
|
||||
}
|
||||
|
||||
var trans = &oauth.Transport{Config: config}
|
||||
var trans = &oauth.Transport{
|
||||
Config: config,
|
||||
Transport: &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: r.SkipVerify},
|
||||
},
|
||||
}
|
||||
var token, err = trans.Exchange(code)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error exchanging token. %s", err)
|
||||
|
|
Loading…
Reference in a new issue