Fork me on GitHub
#immutant
<
2016-07-15
>
len13:07:36

I want to deploy multiple Luminus apps to wildlfy, is there an easy way to do relative url routing in each app or does each app need to know the contxt-path under which its is deployed ?

tcrawley14:07:37

@len: the routing mechanism should honor the :context-path that will be in the ring request automatically. Have you tried it and are having issues?

len14:07:49

yeah the ring redirects got back to the root path

tcrawley14:07:37

are you generating the war files with lein immutant war or with the lein-war plugin?

len14:07:54

I am using lein immutant war and have the context-path set

tcrawley14:07:18

I know jcrossley3 has helped with this exact issue before, but he's away today. Would you be willing to provide an example app that demonstrates the issue? I can then take a look here to see what's up

len14:07:47

I will try get a small case going = thanks !

tcrawley14:07:00

my pleasure!

len14:07:35

essentially there is a part where we do (resp/redirect "/login")

len14:07:48

is that the right way to do it ?

tcrawley14:07:25

what ns is resp aliased to?

len14:07:43

it is [ring.util.response :as resp]

tcrawley14:07:33

redirect doesn't take or use the request map, so doesn't honor :context-path: https://github.com/ring-clojure/ring/tree/master/ring-core/src/ring/util/response.clj#L26

tcrawley14:07:53

let me do some more digging to see what the proper way to generate that url is

len14:07:05

thanks a million

tcrawley14:07:36

can you try (resp/redirect (str (:context request-map) "/login"))?

tcrawley14:07:52

I thought there was a util in ring that would do that for you, but I'm not seeing it

len14:07:57

trying now

len14:07:05

afk for a meet will confirm in 15mins

len14:07:40

@tcrawley: perfect that works

tcrawley15:07:06

@len: great! That should also work fine outside of WildFly

len15:07:42

yip looks good - just refactoring so all redirects etc use that