Skip to content

[Request]: Configurable redirect policy for registry requests. #907

Description

@jglogan

Feature or enhancement request details

We could enhance RegistryClient such that a caller could:

  • Disallow all redirects.
  • Limit redirects to a maximum number of hops (the limit is 5 today, which is determined by the HTTPClient.Configuration.RedirectConfiguration default).
  • Allow or deny a redirect response depending on the original requests HTTP method, original URL, and the current URL and hop count.

The default policy should should interoperate with all widely used repos (Docker Hub, AWS, Google Cloud, GitHub, Azure, Quay, Oracle, etc.)

The enhancement should provide a helper for identifying loopback, RFC1918, and link-local redirects for both IPv4 and IPv6.

Please do not send a PR for this issue before first proposing and refining a design in the issue comments. At that point we can assign you for the PR work.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions