Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
bugfix: initialize dfget downloader in dfdaemon
Browse files Browse the repository at this point in the history
Signed-off-by: lowzj <[email protected]>
  • Loading branch information
lowzj committed Apr 29, 2020
1 parent 77c995d commit 8134362
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dfdaemon/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
reverseProxy := httputil.NewSingleHostReverseProxy(proxy.registry.Remote.URL)
t, err := transport.New(
transport.WithDownloader(proxy.downloadFactory()),
transport.WithStreamDownloader(proxy.streamDownloadFactory()),
transport.WithTLS(proxy.registry.TLSConfig()),
transport.WithCondition(proxy.shouldUseDfgetForMirror),
)
Expand Down Expand Up @@ -268,6 +269,7 @@ func (proxy *Proxy) handleHTTP(w http.ResponseWriter, req *http.Request) {

func (proxy *Proxy) roundTripper(tlsConfig *tls.Config) http.RoundTripper {
rt, _ := transport.New(
transport.WithDownloader(proxy.downloadFactory()),
transport.WithStreamDownloader(proxy.streamDownloadFactory()),
transport.WithTLS(tlsConfig),
transport.WithCondition(proxy.shouldUseDfget),
Expand Down

0 comments on commit 8134362

Please sign in to comment.