-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Feature request: remove extensions from path #96
Comments
This seems pretty reasonable. I'm not sure if this would be an option in this module vs an option in |
This is a good point. When I opened this, my specific goal was to serve static html files that I had built and viewed from the file system. When viewing from the file system, the Now that I'm thinking about it, a middleware that runs before For the conversation :)... If this was going to go in |
Yea, your goal definitely makes sense 👍 I have done the same in the past with Apache rewrite rules and PHP. A middleware before this middleware would work, as long as you're OK with the rewrites being "blind" -- as in a request to Yea, I don't think that this change can be done only in this module; it would require some changes to |
That's something I hadn't thought about.
Makes sense. I might try out some ideas this weekend (these changes aren't urgent since there are other ways to handle it). Thanks for the information and the ideas! |
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:
I think this would only happen if the
extensions
option is already populated with the extensions forsend
to look for.The text was updated successfully, but these errors were encountered: