Skip to content

Commit e017b18

Browse files
andreasjanssontechnillogue
authored andcommitted
Make nydusd work with Google Artifact Registry
GAR throws 400 if you pass form data to the token request. It also needs the ability to make up to 2 redirects.
1 parent 97b6f39 commit e017b18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

storage/src/backend/connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ impl Connection {
635635
let mut cb = Client::builder()
636636
.timeout(timeout)
637637
.connect_timeout(connect_timeout)
638-
.redirect(Policy::none())
638+
.redirect(Policy::limited(2))
639639
.use_rustls_tls()
640640
.tcp_keepalive(Some(Duration::from_secs(5 * 60)))
641641
.pool_max_idle_per_host(pool_max_idle_per_host);

storage/src/backend/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ impl RegistryState {
264264
Method::GET,
265265
auth.realm.as_str(),
266266
Some(&query),
267-
Some(ReqBody::Form(form)),
267+
None,
268268
&mut headers,
269269
true,
270270
true,

0 commit comments

Comments
 (0)