Thanks. Looks good. I test it and it works but that code brokes main route "/" defined in:
(defroutes home-routes
(GET "/" [] (some-handler))
...)
Our wrap-canonical-redirect middleware remove trailng slash and we get 404 error :) I think it's problem Compojure, not Luminus
At now moment I removed this middleware and tune 301 redirect on front server Nginx from URL with trailing slash. Perhaps this is a good solution. In my case it is SEO requirements.
But what about case when user hasn't front server and he want all-in jar solution?
PS
I found Clojure and Luminus recently. It is very interesting framework and maybe I just didn't have enough knowledge about it.
I noticed that frameworks like Express and Scotty (Sinatra inspaired) has another behavior. For example if we define "/test-route" we catch "/test-route" and "/test-route/" too without 404 error.
понедельник, 25 декабря 2017 г., 0:09:45 UTC+3 пользователь Dmitri написал: