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:47 TheAthlete joined 09:32 Skarsnik__ left 10:26 TheAthlete left 11:37 Altai-man joined 13:03 TheAthlete joined 16:37 sena_kun_ joined, Altai-man left 16:45 andinus joined
andinus can i make cro respond to both 'page' and 'page/' ? 16:45
17:56 Altai-man joined 17:58 sena_kun_ left
jnthnwrthngtn andinus: I guess you could write a bit of middleware that strips a trailing / off or similar 18:02
before { request.target = request.target.chop if request.target.ends-with('/') } or some such 18:03
before { request.target .= chop if request.target.ends-with('/') } # a bit less repetitive 18:04
.oO( .chomp needs an argument: request.target .= chomp("/") )
18:26 Altai-man left
andinus thanks that will work 18:53
i'll probably setup a rdirect instead, dicsussion in #raku paste.debian.net/hidden/631747b2/
19:34 lizmat left 20:31 lizmat joined 20:46 TheAthlete left
jnthnwrthngtn Yes; can use a similar approach, just call `redirect` in the `before` with the tweaked url :) 21:32
22:39 xinming left 22:41 xinming joined 22:52 xinming left, xinming joined 23:08 xinming left 23:09 xinming joined 23:24 sena_kun left 23:27 xinming left 23:28 xinming joined 23:50 sena_kun joined