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 configs which use a root path, and subpaths #23

Closed

Conversation

dnephin
Copy link

@dnephin dnephin commented May 6, 2018

Trimming a / from the path / resulted in a broken config.

Example:

paths:
  /:
    repo: repo1

  /middle:
    repo: repo2

Using this config any subpackage in repo1 that sorted before middle would work, but anything after would cause a 404 response. This can be reproduced in TestPathConfigSetFind by changing any paths of "/" in the paths field to "" (which is actually what find() was receiving).

With this patch, / urls are preserved as / and all subpackages of repo1 will be available from the vanity url, so TestPathConfigSetFind accurately reflects the behaviour of find().

Trimming a trailing / would break lookups of subpaths
davidnewhall added a commit to golift/turbovanityurls that referenced this issue Jul 18, 2019
davidnewhall added a commit to golift/turbovanityurls that referenced this issue Jul 18, 2019
@dnephin dnephin closed this May 14, 2022
@dnephin dnephin deleted the fix-root-paths branch May 14, 2022
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.

None yet

1 participant