Welcome the channel on the development of Cro, a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all the Raku Programming Language has to offer (cro.services). This channel is being logged for historical purposes. Set by lizmat on 24 May 2021. |
|||
08:13
sena_kun joined
10:29
Xliff joined
|
|||
Xliff | jnthn: Regarding before handlers. Is there a way to set a before handler so it is run as the first thing in the request? | 10:29 | |
lizmat | .oO( the way-before handler :-) |
11:49 | |
Xliff | lizmat: *snrk* | 13:21 | |
Is that like the way-back machine? | |||
lizmat | no don't think so :-) | 13:22 | |
13:40
xinming_ left
13:42
xinming_ joined
|
|||
Xliff | If I have a "before Cro::HTTP::Session::InMemory[MySessionUser]" middleware, how can I get the MySessionUser object from another, wrapped before middleware? | 14:33 | |
jnthn | Applying the middleware in the server is a sure-fire way since those get a look in before any applied in a route block. But generally they are executed in the order they are applied, so make sure it's in the outer-most route block of the application and before any other `before`. | 20:33 | |
And you get the session object via the `.auth` property on the Cro::HTTP::Request; see cro.services/docs/http-auth-and-sessions | 20:34 | ||
20:54
sena_kun left
|