From b4d76b4e509d552724ed3879818cecb753f48b7a Mon Sep 17 00:00:00 2001 From: Zeke Gabrielse Date: Fri, 24 Jan 2025 08:49:09 -0600 Subject: [PATCH] add docker api version header to ping --- config/routes.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 7333c80bf..e53e430a3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -664,8 +664,9 @@ scope module: 'api/v1/release_engines', constraints: { subdomain: 'oci.pkg' } do # NOTE(ezekg) /v2 namespace is handled here because docker wants it at the root... scope :v2 do + # see: https://github.com/distribution/distribution/blob/main/docs/content/spec/api.md#api-version-check # see: https://github.com/opencontainers/distribution-spec/blob/main/spec.md#endpoints - match '/', via: %i[head get], to: -> env { [200, {}, []] } + match '/', via: %i[head get], to: -> env { [200, {'Docker-Distribution-Api-Version': 'registry/2.0'}, []] } case when Keygen.multiplayer?