1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-06-27 16:35:58 +00:00

fix: if insecure == true, get proxy too (#535)

Fixes https://code.forgejo.org/forgejo/runner/issues/534

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/535
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-05-02 21:54:37 +00:00 committed by earl-warren
parent 01769bfae8
commit e57a12dac9
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201

View file

@ -18,6 +18,7 @@ func getHTTPClient(endpoint string, insecure bool) *http.Client {
if strings.HasPrefix(endpoint, "https://") && insecure {
return &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},