reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
gibi 2021-06-06T00:54:16.076500Z

hi ! I'm following this example to add the allow origin header with a reitit middleware function, it seems not to work for meΒ https://github.com/metosin/reitit/issues/143#issuecomment-647191697 am I doing anything wrong? Thanks

gibi 2021-06-06T01:23:01.076900Z

https://pastebin.com/sR4UTuSE

ikitommi 2021-06-06T06:47:36.079100Z

both CORS and session handling are bit awkward as there isn't prebindled mw for those and the existing libs assume middleware-first pattern (reitit is route-first).

dharrigan 2021-06-06T07:06:50.079800Z

I have a little example of setting the CORS stuff here, could also be useful πŸ™‚

1πŸ™Œ
gibi 2021-06-06T08:52:57.080500Z

Thanks! πŸ™‚

gibi 2021-06-06T08:53:45.080700Z

I've seen I need to place wrap-cors before the coercion middleware, otherwise it doesn't work :thinking_face:

ikitommi 2021-06-06T06:47:42.079200Z

see https://github.com/metosin/reitit/issues/236

1πŸ‘
dharrigan 2021-06-06T07:06:50.079800Z

I have a little example of setting the CORS stuff here, could also be useful πŸ™‚

1πŸ™Œ
gibi 2021-06-06T08:52:57.080500Z

Thanks! πŸ™‚

gibi 2021-06-06T08:53:45.080700Z

I've seen I need to place wrap-cors before the coercion middleware, otherwise it doesn't work :thinking_face: