Skip to content

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

Open
wallzero wants to merge 15 commits into
domadams:masterfrom
wallzero:master
Open

Add type file, Support nested files, / index routes, and trailing ? query strings#2
wallzero wants to merge 15 commits into
domadams:masterfrom
wallzero:master

Conversation

@wallzero

Copy link
Copy Markdown
  • 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
Copy Markdown
Author

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

Comment thread .gitignore
@wallzero

Copy link
Copy Markdown
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