Do not add second Api-Version header

Only append "additional" Docker-Distribution-Api-Version header in case
none were received from upstream.

Signed-off-by: forkbomber <forkbomber@users.noreply.github.com>
This commit is contained in:
forkbomber 2016-09-23 20:37:23 +00:00 committed by Joao Fernandes
parent 8149893423
commit 5e61498792

View file

@ -100,8 +100,7 @@ http {
## In the case of nginx performing auth, the header will be unset ## In the case of nginx performing auth, the header will be unset
## since nginx is auth-ing before proxying. ## since nginx is auth-ing before proxying.
map $upstream_http_docker_distribution_api_version $docker_distribution_api_version { map $upstream_http_docker_distribution_api_version $docker_distribution_api_version {
'registry/2.0' ''; '' 'registry/2.0';
default registry/2.0;
} }
server { server {