-
Notifications
You must be signed in to change notification settings - Fork 11
Description
None of this section from the docs is actually implemented ...
-
There seems to be fairly broad agreement that having distinct
meanings for/fooand/foo/is a Bad Thing, which makes sense
since it would be difficult for a user to predict the difference.
However, it is often useful to ensure that they both map to the same
resource rather than having one work and the other get a 404 error.add-resource accepts a
slash:keyword argument. When true (the
default),add-resourcewill automatically map the child resource
to both the given URL prefix and to the same URL with a trailing
slash added. That is,add-resource(parent, "foo/bar", child)will map child to both
foo/barandfoo/bar/. To change this
behavior pass theslash:keyword argument:slash: #"canonical"
Make the trailing slash URL prefix canonical (by redirecting the
one without the trailing slash). Think "slash is canonical".slash: #"copy"
Map the given resource to both the given URL and the URL with
the trailing slash. Think "slash is a copy".slash: #"redirect"(the default)
Redirect the trailing slash version of the URL to the one with
no trailing slash. Think "slash is redirected".slash: #f
Don't map the trailing slash URL prefix to any resource. Use
this carefully since it can cause confusing results for users.