-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy_cache_convert_head required for pushing to ECR #88
Comments
Hi, sorry for the delay in getting back to you. |
BTW regarding ECR, I know some people are using it against ECR, but I highly doubt any of them had ALLOW_PUSH too. Could you share your use-case? It is a build farm? |
ALLOW_PUSH is quite new so I was happy to see it exists :-) I'll try to create a PR in the next few days. Edit: just saw #59 (review), maybe should have searched in the issues for HEAD and GET sooner... |
Can anyone share how to authenticate the proxy on ECR? |
Hi,
with
ALLOW_PUSH=true
, I had problems this week to push to Elastic Container Registry: HTTP 400 withunexpected end of JSON input: ""
. Finally I found out that Nginx converts HEAD requests to GET by default. Disablingproxy_cache_convert_head
fixes the issue for me.Like the documentation at http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_convert_head says, I also extended the
proxy_cache_key
to include the request method - however, I'm not sure this is really needed (depends on whether the same address is used with both HEAD and GET - I don't know if this is impossible with the registry protocol or not). Of course, changing the key basically invalidates the whole current cache.Did someone else experience this, is this ECR-specific? Or do you know whether the cache key could stay as it is without risk of returning wrong responses?
I do not really feel confident of creating a PR, as I'm not sure if changing the request method is really required or not - and that's a breaking change.
Thanks!
The text was updated successfully, but these errors were encountered: