XAMPP .htaccess AddEncoding br brotli

XAMPP .htaccess AddEncoding br brotli

我没有安装新的 MacOs HighSierra XAMPP (osx-7.4.6-0-vm) and start it - server runs on IP 192.168.64.2 . Then I mount /opt/lampp and click to Explore. The Finder window open and I go to directory htdocs/. Then inside htdocs I create folder assets and inside it I copy file alice.wasm (this file is compressed using brotli (br)). You can download this test (brotli compressed) file using this jsfiddle generator。在 htdocs 我创建了以下 .htaccess 文件

<IfModule mod_mime.c>
  AddType application/wasm .wasm
  AddEncoding br .wasm
  AddOutputFilterByType DEFLATE application/wasm
</IfModule>

问题

当我去http://192.168.64.2/assets/alice.wasm browser not download file and in chrome>networks tab I see (here are more details)

(failed) net::ERR_CONTENT_DECODING_FAILED

但是,当我将 AddEncoding br .wasm 更改为 AddEncoding rar .wasm(或者 'br' 我使用 zipnone)时,浏览器下载文件 (details) 但问题是浏览器不会自动解压缩文件(因此它会保存压缩文件)。

当我将这个 .htacces 文件和 alice.wasm 文件放到一些类似 AZURE apache 的服务器上时(但我无权访问它的配置文件)然后浏览器下载文件并将其解压缩苍蝇 (details) - 所以这是可能的。

问题:我应该怎么做才能使XAMPP按预期工作?

很奇怪,但是当我启用端口转发时

然后转到 http://localhost:8080/assets/alice.wasm then Chrome download file and automatically decompress it (exactly what I want). AZURE works on HTTPS and file was downloaded properly probably because brotli compression is support only for HTTPS - 然而可能 Chrome localhost 是 'special' 并且也允许它。