Ring expects the response to be map, so there should be a custom middleware before each component (handler or middleware) that converts Deferred into map so the next step sees a map
if only handler emits Deferreds, just add that mw just before the handler and you are good to go.
like https://github.com/ztellman/aleph/pull/442, but the other way around
maybe that mw could be added to aleph?
at least reitit-ring allows one to manipulate the mw chain at creation time, so one could interleave easily such mw between all other mw.
(not saying it's a good idea, just possible)
@ikitommi Do you mean a mw that would deref the incoming response and pass the plain map to the next handler?