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

🐛Fix tag links navigating to home #191

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

Conversation

bvanderlaan
Copy link

Some of the tag links when clicked would take you to the default page (i.e. home view).
This only happened on images which didn't have
a user prefix (i.e. nginx vs. my/nginx).

This happened because the links were built expecting the prefix so the URL
was //nginx but that was not routed properly so the user fell into the catch
other otherwise handler which took them to the repositories view.

This change set fixes that by building the links with URLs that include the
prefix if it exists or without the prefix if the image does not have a user
prefix.

Some of the test links when clicked would take you to the default page (in this
case the repositories view). This only happened on images which didn't have
a user prefix (i.e. nginx vs. my/nginx).

This happened because the links were built expecting the prefix so the URL
was //nginx but that was not routed properly so the user fell into the catch
other 'otherwise' handler which took them to the repositories view.

This change set fixes that by building the links with URLs that include the
prefix if it exists or without the prefix if the image does not have a user
prefix.
@ChaotX
Copy link

ChaotX commented Jun 9, 2018

Maybe that is an other issue, but in the docker image reference definition tests there is an example for multiple subrepo path component names:
https://github.com/docker/distribution/blob/master/reference/reference_test.go
like "sub-dom1.foo.com/bar/baz/quux"
These names containing more / separator characters may still broke the links.

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.

2 participants