Questions tagged [ngx-brotli]
12 questions
6
votes
1 answer
Sharing MIME type list using GZIP and BROTLI in NGINX
I want to enable GZIP and Brotli compression using NGINX. I have to supply each with their own list of MIME types like so in my nginx.conf:
gzip_types text/plain
text/css
...etc;
brotli_types text/plain
…

Muhammad Rehan Saeed
- 35,627
- 39
- 202
- 311
4
votes
1 answer
What is the optimum minimum length for brotli compression?
google ngx_brotli default at 20
some websites mentioned minimum should be 100
some says don't go over 256 bytes
what's the exact figure actually? both for nginx and for normal brotli compression minimum.
Can anyone help answer? Thanks in…

Okit Tfseven
- 131
- 7
3
votes
1 answer
Why does Brotli Command Line only allow up to level 9?
According to the main GitHub page for Brotli there are 11 levels of dynamic compression.
Sets on-the-fly compression Brotli quality (compression) level. Acceptable values are in the range from 0 to 11.
However another page of the project shows…

YAHsaves
- 1,697
- 12
- 33
2
votes
1 answer
Nginx: cache Brotli compressed proxied upstream responses
I enabled Brotli compression in Nginx for a dynamically generated, but rarely changing resource.
My expectation was that when Nginx caches upstream responses, it will also cache the compression result. Thus, I assumed the CPU cost of enabling Brotli…

Philipp Claßen
- 41,306
- 31
- 146
- 239
2
votes
2 answers
How can I use nginx brotli_static with proxy_pass?
nginx is compiled with Brotli enabled. In my nginx.conf
http {
...
brotli_static on;
}
My .br files are located on a server with proxy_pass.
location / {
...
proxy_pass http://app;
}
And .br files have been generated on that app…

mikemaccana
- 110,530
- 99
- 389
- 494
1
vote
1 answer
Browser always gets uncompressed script. Pre-compressed with Brotli
Im using brotli to pre-compress my scripts. Here is my scripts
Nginx config:
root /var/www/laravel/public;
server_name mysite.com;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header…

andrew_jackson
- 125
- 4
0
votes
0 answers
React with brotli compress (webpack) and Nginx
I'm zipping the front-end files in react and setting up a server in nginx to serve them.
Using gzip compression, I managed to get the server to return the front-end files normally, everything working correctly.
I find it difficult to do the same…

rick
- 554
- 6
- 18
0
votes
0 answers
Nginx Brotli dlopen failed (libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory)
Error:
nginx: [emerg] dlopen() "/etc/nginx/modules/ngx_http_brotli_filter_module.so" failed (/etc/nginx/modules/ngx_http_brotli_filter_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf:7
Nginx Brotli…

Newbie Dev
- 1
- 1
- 1
0
votes
1 answer
nginx configured with brotli is not compressing large JSON responses
We have a web app server with nginx running in an apline container on Google Cloud.
nginx is built from source, since the spnego plugin we need is only available as source.
The server runs django, and 95% of the responses are JSON data (some can be…

rep_movsd
- 6,675
- 4
- 30
- 34
0
votes
0 answers
Nginx Brotli header not added
I'm pulling my hairs for days trying to serve brotli compressed files through my local nginx install.
My configuration :
MacOS 12.6, Homebrew, Laravel Valet for managing sites and ssl
default nginx install replaced with nginx-full homebrew…

Pierre
- 4,976
- 12
- 54
- 76
0
votes
1 answer
Is it possible to set Brotli compression level dynamically based on the request headers in Nginx?
I'm using Brotli for response compression, and doing this in Nginx using nginx-brotli module.
I would like to set the value for brotli_comp_level dynamically based on the request headers, so that clients on slow networks could request higher…

Guig
- 9,891
- 7
- 64
- 126
0
votes
1 answer
How to prevent nginx reverse proxy recompress the upstream compressed response?
I have nginx reverse proxy that receives brotli compressed response from upstream (Varnish cache). But, the reverse proxy serves brotli compressed response to browser only if I setup "brotli on;" within the reverse proxy server block.
My goal is to…

Punit S
- 3,079
- 1
- 21
- 26