From eadca6c8d3052f4fc714085e86308c4158165cb5 Mon Sep 17 00:00:00 2001 From: xiekeyang Date: Tue, 13 Jan 2015 16:06:02 +0800 Subject: [PATCH] GET and POST should be not restricted for users. It is free to search and pull images from registry. Therefore, Nginx is modified to limit the authentication location except GET and POST. --- contrib/nginx/nginx.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/nginx/nginx.conf b/contrib/nginx/nginx.conf index 0a6f09f90..34c747264 100644 --- a/contrib/nginx/nginx.conf +++ b/contrib/nginx/nginx.conf @@ -34,8 +34,10 @@ server { } location / { - auth_basic "Restricted"; - auth_basic_user_file docker-registry.htpasswd; + limit_except GET POST{ + auth_basic "Restricted"; + auth_basic_user_file docker-registry.htpasswd; + } include docker-registry.conf; }