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

directories without a trailing slash #31

Closed
ianstormtaylor opened this issue Jul 30, 2014 · 8 comments
Closed

directories without a trailing slash #31

ianstormtaylor opened this issue Jul 30, 2014 · 8 comments

Comments

@ianstormtaylor
Copy link

Would be nice to mimic most static file servers and not require a trailing slash for directories, so that you could do both:

/directory
/directory/

Without having to care (since users aren't likely to type the trailing slash when sharing URLs to things) and they would both work.

@ianstormtaylor
Copy link
Author

Happy to submit a PR if I can be directed on where would be best to add this, since koa-send is also involved for the logic.

@tj
Copy link
Member

tj commented Aug 11, 2014

ah yea I think it used to redirect, been a while since I've looked at the code maybe that never made it over

@evbogue
Copy link

evbogue commented Aug 15, 2015

@tj + @ianstormtaylor

+1ing this issue, as I'm using Koa.js to serve my Metalsmith blog. Is it possible to get this worked out? I don't want to use other static middleware in Koa.js because this one seems to be the supported/popular one.

@pierreburgy
Copy link

+1

@pierreburgy
Copy link

I just submitted a pull request for this issue : #51. Is it possible to accept it and to publish it on NPM as soon as you have time ?

@evbogue
Copy link

evbogue commented Oct 6, 2015

Thanks for figuring this one out Pierre.

On Tue, Oct 06, 2015 at 05:57:40AM -0700, Pierre BURGY wrote:

+1


Reply to this email directly or view it on GitHub:
#31 (comment)

@pierreburgy
Copy link

I finally did the pull request at the koa-send level : koajs/send#28

@haoxins
Copy link
Member

haoxins commented Oct 14, 2015

Landed in koa-send@2, koa-static@1.5

@haoxins haoxins closed this as completed Oct 14, 2015
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

No branches or pull requests

5 participants