|
16 | 16 | 2. [Push](#push) |
17 | 17 | 3. [Content Discovery](#content-discovery) |
18 | 18 | 4. [Content Management](#content-management) |
| 19 | +- [Proxying](#proxying) |
19 | 20 | - [Backwards Compatibility](#backwards-compatibility) |
20 | 21 | - [Unavailable Referrers API](#unavailable-referrers-api) |
21 | 22 | - [Upgrade Procedures](#upgrade-procedures) |
|
26 | 27 | - [Warnings](#warnings) |
27 | 28 | - [Appendix](#appendix) |
28 | 29 |
|
29 | | - |
30 | 30 | ## Overview |
31 | 31 |
|
32 | 32 | ### Introduction |
@@ -709,6 +709,23 @@ Upon success, the registry MUST respond with code `202 Accepted`. |
709 | 709 | If the blob is not found, a `404 Not Found` code MUST be returned. |
710 | 710 | If blob deletion is disabled, the registry MUST respond with either a `400 Bad Request` or a `405 Method Not Allowed`. |
711 | 711 |
|
| 712 | +### Registry Proxying |
| 713 | + |
| 714 | +A registry MAY operate as a proxy to another registry to delegate functionality or implement additional functionality. |
| 715 | +An example of delegating functionality is proxying pull operations to another registry. |
| 716 | +An example of adding functionality is implementing a pull-through cache of pulls to another registry. |
| 717 | +When operating as a proxy, the `Host` header passed to the registry will be the host of the PROXY and NOT the host in the repository name used by the client. |
| 718 | +A `ns` query parameter on pull operations is OPTIONAL, but when used specifies the host in a repository name used by a client. |
| 719 | +The host in the repository name SHOULD be the first component of the full repository name used by a client. |
| 720 | +This host component in a repository name SHOULD be the registry host a client considers the primary source for a repository, however, a client MAY be configured to use a different host. |
| 721 | +This original host component used by the client is referred to as the source host in the API documentation. |
| 722 | +A proxy registry MAY use the `ns` query parameter to resolve an upstream registry host. |
| 723 | +A registry MAY choose to ignore the `ns` query parameter. |
| 724 | + |
| 725 | +A client SHOULD be aware of whether a registry host is being used is a proxy, such as when the `ns` query parameter differs from the `Host` header. |
| 726 | +A client SHOULD avoid sending `ns` query parameters to non-proxy registries. |
| 727 | +A client SHOULD NOT unintentionally send authorization credentials for an upstream registry to a proxy registry. |
| 728 | + |
712 | 729 | ### Backwards Compatibility |
713 | 730 |
|
714 | 731 | Client implementations MUST support registries that implement partial or older versions of the OCI Distribution Spec. |
|
0 commit comments