expressjs / expressjs/serve-static

Feature request: remove extensions from path

Open
#96 4 comments 1 reaction 0 assignees View on GitHub
ideas
Dominant language
JavaScript
Stars
1.4k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

Since `send` is able to handle finding files when the extensions don't exist in the path, would it be possible to expand the redirect functionality here to remove extensions?

For instance, these redirects would take place:

| from | to |
| --- | --- |
| /login.html | /login |
| /something/index.html | /something/ |

I think this would only happen if the `extensions` option is already populated with the extensions for `send` to look for.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.