Brotli compression problem
erralb opened this issue · comments
Indicate troubleshooting steps taken
- Ran
brew update
and retried your prior step? - Ran
brew doctor
, fixed as many issues as possible and retried your prior step? - Checked that a similar issue hasn't already been filed?
- Looked up the software bug tracker if reporting a build error?
- If you're seeing permission errors tried running
sudo chown -R $(whoami) $(brew --prefix)
?
Bug reports / build errors:
Brotli compression not working / Brotli header not added when serving files in the http response.
Brief summary of issue:
I'm not very experienced with nginx so I might have misconfigured something but I have trimple checked everything.
I've installed nginx full with the Brotli module, the installation went fine and nginx is working as expected, but my files are not being served with the brotli header, even though I added this to my config :
brotli on;
brotli_comp_level 6;
brotli_static on;
brotli_types
application/x-javascript
text/xml
application/xml+rss
text/javascript
image/x-icon
image/vnd.microsoft.icon
image/bmp
image/svg+xml
application/octet-stream
application/octet-stream-compressible
application/wasm
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component
;
location ~ .+\.data\.br$ {
add_header Content-Encoding br;
default_type application/octet-stream;
}
location ~ .+\.wasm\.br$ {
add_header Content-Encoding br;
default_type application/wasm;
}
location ~ .+\.js\.br$ {
add_header Content-Encoding br;
default_type application/javascript;
}
But my .data.br and .js.br files do not have the br header in the http response and are not served correctly.
I saw here : https://denji.github.io/homebrew-nginx/ that the brotli module is this one : https://github.com/eustas/ngx_brotli and it seems old.
I was wondering if the module should use the default Google repo instead ? Could that be the problem ?
If so how can I make the install point to the Google repo instead of the old eustas one ?