ring-swagger & compojure-api
Pablo 2021-02-22T17:13:05.000600Z

Hello everyone I’m creating a RESTful API by using metosin/compojure-api (specifically compojure.api.sweet/api), but I have a little problem. I want to censor some keys in every response. I added a middleware by using the extra middleware vector (`:middleware` key), but it is not applied on the default exceptions handlers. I saw the code of [`compojure.api.middleware/api-middleware`](https://github.com/metosin/compojure-api/blob/5c88f32fe56cdb6fcdb3cc506bb956943fcd8c17/src/compojure/api/middleware.clj#L213) and I found that middlewares are wrapped by these exceptions handlers. Could you give me a suggestion of how can I define a middleware that applies on every response? I tried to apply it after api, but it returns an InputStream on the body. Thanks!