heroku-buildpack-php icon indicating copy to clipboard operation
heroku-buildpack-php copied to clipboard

Brotli support

Open ligol opened this issue 5 years ago • 7 comments

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

ligol avatar Aug 14 '19 13:08 ligol

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.

RicoFactset avatar Sep 23 '22 07:09 RicoFactset

Would be very nice to use Brotli

boboldehampsink avatar Nov 24 '22 08:11 boboldehampsink

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

dzuelke avatar Nov 29 '22 12:11 dzuelke

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

boboldehampsink avatar Nov 29 '22 12:11 boboldehampsink

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 avatar Nov 29 '22 13:11 dzuelke

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

dzuelke avatar Nov 29 '22 13:11 dzuelke

Thanks for explaining

boboldehampsink avatar Nov 29 '22 13:11 boboldehampsink