We have an old app using Phoenix 1.2 and we have dozens of endpoints. We want 1 of these endpoints to have its responses compressed via gzip (or whatever the default is that Phoenix uses).
We have all our endpoints defined in a file like this:
defmodule MyApp.Router do use MyApp.Web, :router scope "/", MyApp do get("/bananas", BananasController, :bananas) end end
However, after checking specifications for Phoenix 1.2, we didn’t find a way to compress only 1 endpoint.
We found something in SO, but we don’t understand how we can apply this to our app:
How do we adapt our code to compress responses from only the