Merge pull request #355 from dmcgowan/compose-nginx-forward

Update nginx proxy setting to set forward headers
This commit is contained in:
Stephen Day 2015-04-13 15:14:39 -07:00
commit 1c22aefa5e
2 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,6 @@
proxy_pass http://docker-registry-v2; proxy_pass http://docker-registry-v2;
proxy_set_header Host $http_host; # required for docker client's sake proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900; proxy_read_timeout 900;

View File

@ -1,5 +1,7 @@
proxy_pass http://docker-registry; proxy_pass http://docker-registry;
proxy_set_header Host $http_host; # required for docker client's sake proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Authorization ""; # see https://github.com/docker/docker-registry/issues/170 proxy_set_header Authorization ""; # see https://github.com/docker/docker-registry/issues/170
proxy_read_timeout 900; proxy_read_timeout 900;