Hi Dmitry, Ended up using with this: SessionID is available in Cookies, so I used 'boss_web_controller: generate_session_id'
https://github.com/ngaranko/r2d2/blob/master/src/lib/login_required_filter.erl#L37:L45 Kind regards, - Nikolay Garanko On Thursday, December 26, 2013 4:23:00 PM UTC+1, Dmitry Polyanovsky wrote: > Hi, > indeed it's desired behavior, at least I found Evan's patch to make it > work this way > https://github.com/ChicagoBoss/ChicagoBoss/commit/6f17dc0dfa425d48a9251307c7c3c28bcfbff5d3. > > > We can play around and put it in the config, something like > "always_create_session" option. > > Worth opening new issue. > > On Tuesday, December 24, 2013 10:12:18 PM UTC+2, Nick Garanko wrote: >> >> Hi All, >> >> I'm developing simple 'login_required' filter ( >> https://github.com/ChicagoBoss/ChicagoBoss/blob/master/README_FILTERS.md) >> and found one strange issue: >> SessionID is undefined in RequestContext only in case >> a. SessionID wasn't generated before >> b. Controller not making use of SessionID >> >> This is related to code: >> >> https://github.com/ChicagoBoss/ChicagoBoss/blob/master/src/boss/boss_web_controller.erl#L385:L389 >> and probably it is desired behavior. >> >> My question is: >> Is it very expensive to generate SessionID for each request? >> >> I do need SessionID in every request and adding SessionID into every >> controller is not convenient. :( >> >> Kind regards, >> - Nikolay Garanko >> > -- You received this message because you are subscribed to the Google Groups "ChicagoBoss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
