Skip to content

Commit

Permalink
url.host
Browse files Browse the repository at this point in the history
  • Loading branch information
frantjc committed Apr 12, 2024
1 parent 572eb59 commit 7afebe8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/dind/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ func ServeDockerdProxy(ctx context.Context, mounts map[string]string, lis net.Li
// This directory just makes http.DefaultTransport
// happy just long enough for it to use our dialer.
Director: func(r *http.Request) {
r.URL.Scheme = "http"
if r.URL.Scheme != "https" {
r.URL.Scheme = "http"
}

if r.Host == "" {
r.Host = "api.moby.localhost"
if r.URL.Host == "" {
r.URL.Host = "api.moby.localhost"
}
},
Transport: transport,
Expand Down

0 comments on commit 7afebe8

Please sign in to comment.