Handle trailing `/` in routes
Currently, one has to separately handle the presence/absence of trailing slashes, by having a route for "", and one for "/".
I think it would be more intuitive if a trailing slash were automatically added, or removed, via redirects.
For the record, Go's serveMux does the former.
IIRC Dream sticks to the RFCs in treating these differently, as, IIRC, "" refers to a file-like resource and "/" to a directory. It may be a little old-fashioned. This could be a good use case for a middleware.
Maybe we could introduce a small new addition to the Dream path syntax to handle an optional trailing slash, eg /foo:/ could match against both /foo and /foo/?
I was working on middleware for a project and noticed "Router path access is being removed from the API."
Dream.path and Dream.with_path both are showing this error.
Is there a way to handle this with the functions still available?
I guess with Dream.target
Duplicate of #125?
Not quite, they are just on similar topics.