On 26 July 2013 11:17, Sebastian Rojas <sebastian.rojas.viva...@gmail.com>wrote:

> Checkout this middleware in lib-noir
> https://github.com/noir-clojure/lib-noir/blob/master/src/noir/util/middleware.clj#L70
>

Unfortunately that middleware only changes the way your handlers see the
URI of the request. The issue Reginald is talking about is that the browser
resolves relative links differently if you have a slash at the end.

For example, from a page of "/posts" a relative link to "comments" would go
to "/comments", but from "/posts/" a relative link to "comments" would go
to "/posts/comments".

Reginald: I don't have a good solution to this problem, but I have
experienced it in the past. In theory it wouldn't be too difficult to make
some middleware to redirect with a 301, but you'd need to make sure you
maintain other important bits of the request (:flash, query parameters,
etc.) which could be quite fiddly.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to