It's really surprising considering how widespread Brotli support is, that there isn't a better nginx support for it.
[1] https://github.com/google/ngx_brotli [2] https://github.com/eustas/ngx_brotli [3] https://answers.launchpad.net/ubuntu/+source/nginx/+question... [4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919320
Also, there's also a Dropbox Rust library: https://github.com/dropbox/rust-brotli