docker-registry-proxy icon indicating copy to clipboard operation
docker-registry-proxy copied to clipboard

Disable conversion of HEAD method to GET

Open aspettl opened this issue 4 years ago • 1 comments

This PR disables the conversion of request method HEAD to GET when caching applies. As the documentation at http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_convert_head suggests, the cache key is extended with the method. In order to not invalidate existing caches, I decided to keep the cache keys for GET as they are. Only HEAD requests will use a "HEAD:" prefix. This could be cleaned up later when a breaking change needs to be made anyway (e.g., why don't we have the FQDN or registry name in the cache key?).

  • This fixes https://github.com/rpardini/docker-registry-proxy/issues/88.
  • This also addresses earlier problems like e.g. https://github.com/rpardini/docker-registry-proxy/pull/59#pullrequestreview-530081801

aspettl avatar Apr 23 '21 18:04 aspettl

@rpardini Is there any concern on merging this? I'd also like to see https://github.com/rpardini/docker-registry-proxy/pull/107, which would produce a conflict here, but I can fix that.

aspettl avatar Nov 19 '22 08:11 aspettl