My question is similar to Nginx reverse-proxy to a cloudfront distribution and preserve gzip compression but especially regarding the new brotli compression algorithm that is supposed to perform better than gzip in some cases
My AWS Cloudfront Distribution supports brotli
But my website is behind a nginx proxy for various reason, and when proxy_passing the request to cloudfront, I'm losing the brotli compression and I only get gzip.
I have activated gzip compression and gzip_proxied, is there an equivalent that would allow either gzip or brotli compression to be preserved from the cloudfront distribution ? I've heard of brotli modules for nginx and answers of 2017 (example) that mentioned proxy_pass with nginx + brotli wasn't possible, is it still the case ?
server {
...
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types *;