distribution/registry/api/v2
Michal Minář 1b43e1e30d
Honor X-Forwarded-Port and Forwarded headers
Prefer non-standard headers like X-Forwarded-Proto, X-Forwarded-Host and
X-Forwarded-Port over the standard Forwarded header to maintain
backwards compatibility.

If a port is not specified neither in Host nor in forwarded headers but
it is specified just with X-Forwarded-Port, use its value in base urls
for redirects.

Forwarded header is defined in rfc7239.

X-Forwarded-Port is a non-standard header. Here's a description copied
from "HTTP Headers and Elastic Load Balancing" of AWS ELB docs:

> The X-Forwarded-Port request header helps you identify the port that
> an HTTP or HTTPS load balancer uses to connect to the client.

Signed-off-by: Michal Minář <miminar@redhat.com>
2016-11-02 16:49:42 +01:00
..
descriptors.go Document TOOMANYREQUESTS error code 2016-07-12 12:18:54 -06:00
doc.go Move registry api definitions under registry package 2015-02-10 17:32:22 -08:00
errors.go Typo fixes in comments 2016-02-10 16:26:29 -08:00
headerparser_test.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
headerparser.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
routes_test.go Remove tarsum support for digest package 2015-12-15 17:22:18 -08:00
routes.go Catalog for V2 API Implementation 2015-07-21 21:45:14 -07:00
urls_test.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
urls.go Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00