distribution/registry
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
..
api Honor X-Forwarded-Port and Forwarded headers 2016-11-02 16:49:42 +01:00
auth Update to fix lint errors 2016-10-05 17:47:12 -07:00
client Rename CanonicalAddr -> canonicalAddr 2016-09-19 14:16:02 -07:00
handlers Update to fix lint errors 2016-10-05 17:47:12 -07:00
listener [Server] Listen and serve on a unix socket 2015-05-11 16:00:14 +03:00
middleware Add support for blobAccessController middleware 2016-05-19 14:02:15 +02:00
proxy Satisfy the latest go lint rules 2016-10-14 17:03:08 -07:00
storage Merge pull request #2002 from lnr0626/1996-instance-roles-with-regionendpoint 2016-10-17 13:50:02 -07:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go Add configuration option to disable access logging 2016-09-14 14:33:30 -07:00
registry_test.go Allow registry clients to connect via http2 2016-08-13 22:07:42 -04:00
root.go Remove signature store from registry. Return a generated signature for manifest 2016-05-27 13:19:26 -07:00