Caddy serves .js as text/javascript, which the encode match didn't list, so script assets went out uncompressed. The match now has it and application/wasm (sqlite3.wasm: 849K, 394K gzipped). code.db stays uncompressed: code search reads it in byte ranges of the file as stored.
- commit
- eaeac0c3884f4775fea37212f5e05feaf5608bd1
- parent
- c28b495df900408e9dab14f1a625f89c122bf904
- author
- cat <admin@dev.site>
- kind
- fix risk score 1.1 of 3, Jev's estimate
| M | bin/ | 5 | ++++- |
@@ -830,7 +830,8 @@ cmd_server_caddyfile() {
830830 [ -n "$gohost" ] || gohost={host}831831 cat <<EOF832832 $addr {833- # Compress pages and assets, never the event stream (it would buffer).833+ # Compress pages and assets, never the event stream (it would buffer) or834+ # code.db, which code search reads in byte ranges of the file as stored.834835 encode {835836 gzip836837 match {@@ -838,8 +839,10 @@ $addr {
838839 header Content-Type text/css*839840 header Content-Type text/plain*840841 header Content-Type text/xml*842+ header Content-Type text/javascript*841843 header Content-Type application/javascript*842844 header Content-Type application/json*845+ header Content-Type application/wasm*843846 header Content-Type image/svg+xml*844847 }845848 }