Fork me on GitHub
#yada
<
2015-12-23
>
tangrammer09:12:37

Hi guys! any ideas for how to serve status 500 response with CORS ?

stijn09:12:01

Or any non 2xx response with CORS

stijn09:12:03

ran into that too

stijn09:12:43

@malcolmsparks: here are the things that are important to us 1/ Authentication / Authorization: I have created my own interceptors right now, and gotten to a point where it works pretty well. One of the things I think would be great is if the order of the interceptors is: parse-parameters > authentication > get-properties > authorization. The thing is that in get-properties you often need stuff like the currently logged-in user to retrieve something from the database (like 'my posts' or something) 2/ Long-running HTTP connections: like SSE, but with just JSON separated by \r\n (like the twitter streaming API). I think this is already possible, but didn't try it yet. I don't expect this to be supported out of the box by yada, but should be fairly simple to build. 3/ Async upload (for video) - both multipart-form-data and raw binary in the body 4/ Session handling. I guess this is more of a documentation issue? Or create an interceptor that wraps ring middleware? 5/ What is the recommended way of changing the interceptor chain? If you like to add an interceptor to a limited set of routes, it's kind of tedious to put it at the right place in the chain. I now have a custom chain that has authentication/authorization in it. But these interceptors need to be able to handle handlers that have no authentication/authorization requirements. Not sure how to solve this though, and I might need to study pedestal to see how they do it simple_smile

tangrammer09:12:56

thanks @stijn i'll try to hack the source then until @malcolmsparks recommended way to do that 👍