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

Support optional trailing slash in /browse #225

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kevin940726
Copy link

Fix #219

In order to decide whether to serve the content with file browser UI or directory browser UI, we have to first know whether the file is a directory or a file by actually extracting the tarball beforehand. Since https://unpkg.com/browse/react/readme could either be a file named readme under react package root directory or a directory in react package.

I'm not super happy with the changes here but it works with minimal changes. In the long term, I think we should consider refactor the extracting phase to also acknowledge the approach mentioned in #197. I can work on a POC of that, but maybe later 😅.

CI should be failing due to #220 (comment)

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.

All /browse routes require a trailing slash
1 participant