Reputation: 3729
What is the best way to gzip JSON responses from my Phoenix API server?
Is there any GZIP plug or should I have nginx
in front of Phoenix?
Upvotes: 4
Views: 2291
Reputation: 1091
You can configure gzip compression for all responses from a particular endpoint, such as the one used by your API.
config :app_name, AppName.Endpoint,
http: [compress: true]
Upvotes: 9