heroku / heroku-buildpack-php

Heroku's buildpack for PHP applications.
https://devcenter.heroku.com/categories/php
MIT License
806 stars 1.59k forks source link

Brotli support #356

Open ligol opened 4 years ago

ligol commented 4 years ago

Support of Brotli compression on apache and nginx could be nice to have along Gzip and Deflate.

https://httpd.apache.org/docs/2.4/fr/mod/mod_brotli.html https://github.com/google/ngx_brotli

RicoFactset commented 1 year ago

Serving brotli compressed files reduce transfer size for HTML, CSS, JS and SVG files better than with GZIP, but not JPG, PNG, WebP, GIFs etc. (binary files). So both (GZIP and Brotli) should be available.

boboldehampsink commented 1 year ago

Would be very nice to use Brotli

dzuelke commented 1 year ago

On heroku-22, mod_brotli should be available.

In a custom HTTPD config include (the -C thing), could you try the following?

LoadModule brotli_module libexec/mod_brotli.so
boboldehampsink commented 1 year ago

@dzuelke thanks, and on NGINX? (using NGINX in all my projects only)

dzuelke commented 1 year ago

Thing there is that it's a commercial Nginx Plus module, or that third-party module maintained by Google. So far, we haven't enabled third party modules for Nginx, since they sometimes get abandoned by the maintainers, and then it would be up to us to figure stuff out. But I'll think about it.

However, there's a new buildpack structure coming with the switch to CNBs, where new specialized web server buildpacks for Nginx and HTTPD will likely improve this, and one thing on the features wishlist is the ability to easily-ish BYO modules.

dzuelke commented 1 year ago

(Specifically, that Google-maintained module has a bunch of open, unaddressed issues, and no tagged releases).

boboldehampsink commented 1 year ago

Thanks for explaining