mkuchin / docker-registry-web

Web UI for private docker registry v2
https://hub.docker.com/r/hyper/docker-registry-web/
GNU General Public License v2.0
534 stars 135 forks source link

DELETE bug #12

Closed tomqwu closed 8 years ago

tomqwu commented 9 years ago

Upon DELETE of tag, if it's last tag of the repository then the return page is getting by 302 ERR_CONNECTION_REFUSED.

10.27.140.5 - admin [24/Sep/2015:17:24:18 +0000] "GET /tags/blah HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36" "-"
mkuchin commented 9 years ago

Can you provide more details please? What is 'Location' headers in 302 response after delete operation?
If it's last tag It's should be two 302 redirects, last one with '/' location.

juntagabor commented 9 years ago

@canadatom Are you using https on nginx in front of it?

@mkuchin I found out it redirect to http regardless of whether I am using http or https:

curl -XGET -v -u username https://registry.domain.com/delete/4/test .... < HTTP/1.1 302 Found < Server: nginx/1.8.0 < Date: Tue, 10 Nov 2015 16:56:34 GMT < Content-Length: 0 < Connection: keep-alive < Location: http://registry.domain.com/tags/test < Docker-Distribution-Api-Version: registry/2.0 <

I am using nginx in front of both, UI and registry, to SSL and authenticate. I am also passing: proxy_set_header X-Forwarded-Proto "https";

to both of them. Could it be possible to change the redirect to the protocol being passed by the proxy?

mkuchin commented 8 years ago

fixed in latest version