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

Open
wants to merge 1 commit into
base: master
from

Conversation

@dnephin
Copy link

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 pull request Jul 18, 2019
davidnewhall added a commit to golift/turbovanityurls that referenced this pull request Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.