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

Add type file, Support nested files, / index routes, and trailing ? query strings #2

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

Conversation

wallzero
Copy link

  • Add type file so middleware can be used in TypeScript projects
  • Switch to glob to retrieve all nested files within directory
  • If request is a trailing /, and that route has a compressed index.html, serve it. Important: Doesn't serve if no compressed `index.html is found
  • Strip trailing ? query strings. Query strings are sometimes used for caching but previous code confused them when detecting mime type. I'm unsure if there is a use case where the query string should be preserved but it's captured and kept for now.
  • Ignore package-lock.json
  • Remove $ from example; results in no matches

@wallzero
Copy link
Author

Hey, just wondering if this can get merged. Thanks!

.gitignore Outdated Show resolved Hide resolved
@wallzero
Copy link
Author

Take another look. I also think my changes cover issue #3.

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.

3 participants