Skip to content
This repository has been archived by the owner on Dec 20, 2024. 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 8cac49e commit bacc34b
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 bacc34b

Please sign in to comment.