Update go-containerregistry
Update go-containerregistry to merge in this [PR](https://github.com/google/go-containerregistry/pull/293) and fix
This commit is contained in:
parent
ede93786a1
commit
9a1a2ef9e3
|
|
@ -430,8 +430,7 @@
|
||||||
version = "v0.2.0"
|
version = "v0.2.0"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
digest = "1:f1b23f53418c1b035a5965ac2600a28b16c08643683d5213fb581ecf4e79a02a"
|
||||||
digest = "1:764d0a9bb2c987d9333c5b0a256bc94791db50c0b5be2fa10f2247b1dcbd7a04"
|
|
||||||
name = "github.com/google/go-containerregistry"
|
name = "github.com/google/go-containerregistry"
|
||||||
packages = [
|
packages = [
|
||||||
"pkg/authn",
|
"pkg/authn",
|
||||||
|
|
@ -450,7 +449,7 @@
|
||||||
"pkg/v1/v1util",
|
"pkg/v1/v1util",
|
||||||
]
|
]
|
||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "24bbadfcffb5e05b1578cb2bd5438992ada3b546"
|
revision = "88d8d18eb1bde1fcef23c745205c738074290515"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:f4f203acd8b11b8747bdcd91696a01dbc95ccb9e2ca2db6abf81c3a4f5e950ce"
|
digest = "1:f4f203acd8b11b8747bdcd91696a01dbc95ccb9e2ca2db6abf81c3a4f5e950ce"
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,10 @@ required = [
|
||||||
name = "k8s.io/client-go"
|
name = "k8s.io/client-go"
|
||||||
version = "kubernetes-1.11.0"
|
version = "kubernetes-1.11.0"
|
||||||
|
|
||||||
|
[[constraint]]
|
||||||
|
name = "github.com/google/go-containerregistry"
|
||||||
|
revision = "88d8d18eb1bde1fcef23c745205c738074290515"
|
||||||
|
|
||||||
[[override]]
|
[[override]]
|
||||||
name = "k8s.io/apimachinery"
|
name = "k8s.io/apimachinery"
|
||||||
version = "kubernetes-1.11.0"
|
version = "kubernetes-1.11.0"
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ func (bt *basicTransport) RoundTrip(in *http.Request) (*http.Response, error) {
|
||||||
// abstraction, so to avoid forwarding Authorization headers to places
|
// abstraction, so to avoid forwarding Authorization headers to places
|
||||||
// we are redirected, only set it when the authorization header matches
|
// we are redirected, only set it when the authorization header matches
|
||||||
// the host with which we are interacting.
|
// the host with which we are interacting.
|
||||||
if in.Host == bt.target {
|
// In case of redirect http.Client can use an empty Host, check URL too.
|
||||||
|
if in.Host == bt.target || in.URL.Host == bt.target {
|
||||||
in.Header.Set("Authorization", hdr)
|
in.Header.Set("Authorization", hdr)
|
||||||
}
|
}
|
||||||
in.Header.Set("User-Agent", transportName)
|
in.Header.Set("User-Agent", transportName)
|
||||||
|
|
|
||||||
3
vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go
generated
vendored
3
vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go
generated
vendored
|
|
@ -56,7 +56,8 @@ func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response, error) {
|
||||||
// abstraction, so to avoid forwarding Authorization headers to places
|
// abstraction, so to avoid forwarding Authorization headers to places
|
||||||
// we are redirected, only set it when the authorization header matches
|
// we are redirected, only set it when the authorization header matches
|
||||||
// the registry with which we are interacting.
|
// the registry with which we are interacting.
|
||||||
if in.Host == bt.registry.RegistryStr() {
|
// In case of redirect http.Client can use an empty Host, check URL too.
|
||||||
|
if in.Host == bt.registry.RegistryStr() || in.URL.Host == bt.registry.RegistryStr() {
|
||||||
in.Header.Set("Authorization", hdr)
|
in.Header.Set("Authorization", hdr)
|
||||||
}
|
}
|
||||||
in.Header.Set("User-Agent", transportName)
|
in.Header.Set("User-Agent", transportName)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue