Closed drcapulet closed 6 years ago
Thanks for opening this PR.
Could you rebase off of the latest master
and try running this change through CI?
@seanpdoyle looks like that fixed it, thanks!
This change would redirect all Ember routes to corresponding paths ending in /
.
Could you please elaborate a bit more on your use case?
Could this the application-global effects break Ember routes that are meant to end without a /
?
Would /posts
map to a posts
route, and posts/
require a posts.index
route?
Does Ember routing treat /posts
equivalent to posts/
?
@seanpdoyle this PR only redirects the root URL. If you've got an app mounted at /admin
, any requests to /admin
will be redirected to /admin/
because Ember requires a trailing slash when visiting the root URL - see emberjs/ember.js#4751. Otherwise, the request isn't touched by these changes.
I like this. We currently work around this by adding rack-rewrite rules for each mounted app.
@seanpdoyle if we're redirecting to a url with query parameters, this seems to have a /
at the end of it, putting all the query params into the route. ie. /url?query=test/
For apps not mounted at
/
, apps need to write custom redirect login to add the trailing slash Ember requires - this simplified it by providing it as part ofmount_ember_app
.