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

Allow falling back to file when directory exists but doesn't have index #194

Open
rchl opened this issue Jun 5, 2020 · 0 comments
Open
Labels

Comments

@rchl
Copy link

rchl commented Jun 5, 2020

It might make sense to allow falling back to files when a directory with the same name exists but doesn't have an index.html file.

(I'm using serve-static for unit-testing but I'm creating an issue against send as I think the functionality would have to be added here.)

Reproduction steps

Options:

{
  extensions: ['html'],
  redirect: false,
}

A directory structure like so:

| - fr/
| - fr/foo.html
| - fr.html
| - index.html

Try to load /fr path.

404 is returned because directory with fr name exists but doesn't have index.html file.
In my case, I'd want it to fall back to the root file that actually exists and could be matched with extensions specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants