immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
len 2016-07-15T13:53:36.000400Z

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 ?

2016-07-15T14:02:37.000401Z

@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?

len 2016-07-15T14:03:49.000402Z

yeah the ring redirects got back to the root path

2016-07-15T14:04:37.000403Z

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

len 2016-07-15T14:05:54.000404Z

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

2016-07-15T14:07:18.000405Z

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

len 2016-07-15T14:07:47.000406Z

I will try get a small case going = thanks !

2016-07-15T14:08:00.000408Z

my pleasure!

len 2016-07-15T14:14:35.000409Z

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

len 2016-07-15T14:14:48.000410Z

is that the right way to do it ?

2016-07-15T14:15:25.000411Z

what ns is resp aliased to?

len 2016-07-15T14:15:43.000412Z

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

2016-07-15T14:18:33.000413Z

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

2016-07-15T14:18:53.000415Z

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

len 2016-07-15T14:22:05.000416Z

thanks a million

2016-07-15T14:24:36.000417Z

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

2016-07-15T14:24:52.000418Z

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

len 2016-07-15T14:24:57.000419Z

trying now

len 2016-07-15T14:28:05.000420Z

afk for a meet will confirm in 15mins

len 2016-07-15T14:54:40.000422Z

@tcrawley: perfect that works

2016-07-15T15:09:06.000423Z

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

len 2016-07-15T15:09:42.000424Z

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