You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm pre-zipping static content before bundling it in a Docker container.
This allows me to serve static content gzipped if there's an accept-encoding header that contains gzip without putting extra load on the CPU when serving gzipped content. gzip -rk9 ./build/processedResources/jvm/main/static/* || exit
I wanted to add support for Brotli if the accept-encoding header contains br and then serve whichever one is smaller, file.ext.br or file.ext.gz brotli -rk9 ./build/processedResources/jvm/main/static/* || exit
Turns out -k and -9 does exactly the same as gzip, but the -r flag is not supported which caught me by surprise.
Short-term workaround is to use find ... | args ... | brotli -k9 after I've extensively studied the find and xargs man pages, long-term, it would be nice if I can just do -r and save the hassle of using 3 commands to do one thing.
The text was updated successfully, but these errors were encountered:
I'm pre-zipping static content before bundling it in a Docker container.
This allows me to serve static content gzipped if there's an
accept-encoding
header that containsgzip
without putting extra load on the CPU when serving gzipped content.gzip -rk9 ./build/processedResources/jvm/main/static/* || exit
I wanted to add support for Brotli if the
accept-encoding
header containsbr
and then serve whichever one is smaller, file.ext.br or file.ext.gzbrotli -rk9 ./build/processedResources/jvm/main/static/* || exit
Turns out
-k
and-9
does exactly the same asgzip
, but the-r
flag is not supported which caught me by surprise.Short-term workaround is to use
find ... | args ... | brotli -k9
after I've extensively studied thefind
andxargs
man pages, long-term, it would be nice if I can just do-r
and save the hassle of using 3 commands to do one thing.The text was updated successfully, but these errors were encountered: