From beab2d7fbebc1ebb84d1ba0bfd7dfef0c4fd2e40 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Mon, 18 May 2015 12:05:28 -0700 Subject: [PATCH] Remove set header in compose script Signed-off-by: Derek McGowan (github: dmcgowan) --- contrib/compose/nginx/registry.conf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/compose/nginx/registry.conf b/contrib/compose/nginx/registry.conf index 3c554921..47ffd237 100644 --- a/contrib/compose/nginx/registry.conf +++ b/contrib/compose/nginx/registry.conf @@ -25,9 +25,11 @@ server { if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) { return 404; } - - # The docker client expects this header from the /v2/ endpoint. - more_set_headers 'Docker-Distribution-Api-Version: registry/2.0'; + + # To add basic authentication to v2 use auth_basic setting plus add_header + # auth_basic "registry.localhost"; + # auth_basic_user_file test.password; + # add_header 'Docker-Distribution-Api-Version' 'registry/2.0' always; include docker-registry-v2.conf; }