Skip to content

Commit

Permalink
fix: Implement proxy support. (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junkern authored Mar 17, 2023
1 parent b15ea02 commit 586de75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/provider/resource_docker_registry_image_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ func buildHttpClientForRegistry(registryAddressWithProtocol string, insecureSkip
client := http.DefaultClient

if strings.HasPrefix(registryAddressWithProtocol, "https://") {
client.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureSkipVerify}}
client.Transport = &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureSkipVerify}, Proxy: http.ProxyFromEnvironment}
} else {
client.Transport = &http.Transport{Proxy: http.ProxyFromEnvironment}
}

return client
}

Expand Down

0 comments on commit 586de75

Please sign in to comment.