luminus

sis_xiphos 2019-02-12T02:24:59.000300Z

yeah I'm searching for the serverside code now. Anyway thank you for letting me go beyond 403 status code!

macrobartfast 2019-02-12T18:32:26.001200Z

I am am using luminus with swagger; how do I enable CORS for local development?

macrobartfast 2019-02-12T18:32:45.001500Z

I have tried wrap-cors in the handler but it is not working.

macrobartfast 2019-02-12T18:43:01.001900Z

I also tried it in the middleware file, but in either case I'm doing it wrong.

macrobartfast 2019-02-12T18:43:19.002400Z

I wonder if cors is allowed somewhere already and enabled with a flag or something.

ballpark 2019-02-12T18:46:47.004300Z

@macrobartfast I'm not in clojurians very much, but my recommendation would be to post the code that you've tried, like one would do in a Stack Overflow question. In fact, many times I write my questions in SO, and maybe post the link in Clojurians.

macrobartfast 2019-02-12T19:53:13.004900Z

I've always wondered if it's ok to crosspost like that.

ballpark 2019-02-12T19:54:19.005300Z

hmm. Maybe not. I've never been yelled at, but I don't do it that often

macrobartfast 2019-02-12T20:10:30.006Z

I'm not confident enough in my knowledge to say this... but... could it be true that luminus has no cors support??

macrobartfast 2019-02-12T20:11:07.006300Z

it has so much built in that it seems odd.

ballpark 2019-02-12T20:13:33.008200Z

My understanding of luminus is that the bulk of it is leiningen templating that stitches together other popular Clojure web-app development libraries. If CORS support is offered for Ring, then it should be offered for luminus. Have you tried searching for CORS support for Ring?

macrobartfast 2019-02-12T20:18:02.009400Z

I did... the solution is the wrap-cors middleware, which I've used successfully in the past but with luminus there are more layers than I'm familiar with with things like mount, so it's not working so far.

macrobartfast 2019-02-12T20:18:24.009900Z

really, just my lack of knowledge for how the various parts play together.

macrobartfast 2019-02-12T20:22:08.010900Z

I would have just thought folks would have been hitting their endpoints so often from luminous served apps that they would be needing cors out of the box.

macrobartfast 2019-02-12T20:36:10.011700Z

but what's strange is that all the permutations of searching for variants on 'adding cors to luminus with swagger' and so on isn't finding anything useful.

ballpark 2019-02-12T20:38:39.012100Z

sorry I couldn't be more help!

macrobartfast 2019-02-12T20:38:57.012500Z

not a problem, and thanks for being supportive!

ballpark 2019-02-12T20:39:32.013400Z

if you find a solution, post in here and tag me. I'm interested

macrobartfast 2019-02-12T20:40:25.014300Z

will do!