Skip to content
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

Issue 75 fix - allow all HTTP methods to pass through registry proxy #182

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

quickshiftin
Copy link

Regarding the closed issue #75 - Can't push when using frontend as registry it seems there is still an issue to @jangrewe's point...

Noticing the Apache config is designed to allow proxying v2 straight through to the registry:

  # Proxy all docker REST API registry
  # requests to the docker registry server.

  <IfModule ssl_module>
     SSLProxyEngine on
     # SSLProxyVerify none
     SSLProxyCheckPeerCN off
     SSLProxyCheckPeerName off
  </IfModule>
  ProxyPreserveHost Off
  ProxyPass /v2/ ${DOCKER_REGISTRY_SCHEME}://${DOCKER_REGISTRY_HOST}:${DOCKER_REGISTRY_PORT}/v2/
  ProxyPassReverse /v2/ ${DOCKER_REGISTRY_SCHEME}://${DOCKER_REGISTRY_HOST}:${DOCKER_REGISTRY_PORT}/v2/

And that I could pull, but not push, because of the FRONTEND_BROWSE_ONLY_MODE HTTP GET restriction:

  <IfDefine FRONTEND_BROWSE_ONLY_MODE>
    <Location />
      <LimitExcept GET>
        Order Allow,Deny
        Deny From All
      </LimitExcept>
    </Location>
  </IfDefine>

It seems only fair to allow all HTTP methods to flow through the /v2/ proxy (which is what I've added in this patch).

I've tested the change in my environment and pushes now work through the frontend. FWIW, I spent hours trying to figure out what was wrong... At the very least if this patch isn't accepted, something should be added to the README explaining that pushes aren't supported through the frontend, though I'm unsure why you'd want to prohibit them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant