Skip to content

Commit

Permalink
add docker api version header to ping
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Jan 24, 2025
1 parent 665ff27 commit f234e9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit f234e9f

Please sign in to comment.