forked from infra/ansible
distgit: disable mod_mime_magic content encoding for archives
mod_deflate wasn't the issue, as src didn't have gzip enabled. The backend (pkgs01) uses mod_mime_magic, which sniffs .crate files and adds false gzip headers. Forcing application/octet-stream fixes the client double-decompression bug. Fixes #12812. Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
This commit is contained in:
parent
c6954081de
commit
b935cd4d86
1 changed files with 10 additions and 5 deletions
|
|
@ -3,11 +3,16 @@ Alias /lookaside /srv/cache/lookaside
|
|||
Options Indexes FollowSymLinks
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
|
||||
{% if env == 'staging' %}
|
||||
# Disable global mod_deflate for lookaside cache
|
||||
# to prevent double-compression and false gzip headers
|
||||
SetEnv no-gzip 1
|
||||
SetEnv dont-vary 1
|
||||
# Disable mod_mime's automatic Content-Encoding for archives
|
||||
RemoveEncoding .gz .tgz .bz2 .xz .zst .lzma .crate
|
||||
|
||||
# Force all lookaside files to be served as generic binary data.
|
||||
# This prevents mod_mime_magic from sniffing .crate files and adding x-gzip encoding.
|
||||
ForceType application/octet-stream
|
||||
|
||||
# Explicitly remove Content-Encoding just to be absolutely sure
|
||||
Header unset Content-Encoding
|
||||
{% endif %}
|
||||
</Directory>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue