Compressing HTTP Messages with Gzip
Last updated April 28, 2023
Heroku doesn’t modify HTTP requests or responses that are sent by your application. This means that features like HTTP compression are your application’s responsibility.
You can easily serve Gzipped HTTP messages directly from your application code. Here are documentation links for popular Gzip compression libraries for all Heroku-supported languages:
|Node.js||compression (Express middleware), Zlib|
|Python||gzip (standard library), django.middleware.gzip|
|Java||Spring, Tomcat, Jetty|