AddType application/octet-stream .data
AddType application/wasm .wasm

RewriteEngine on
RewriteCond %{HTTP:Accept-Encoding} br
RewriteCond %{REQUEST_URI} .*\.(data|js|wasm)
#RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.br
RewriteRule "\.data\.br$" "-" [T=application/octet-stream,E=no-brotli,E=no-gzip]
RewriteRule "\.js\.br$" "-" [T=application/javascript,E=no-brotli,E=no-gzip]
RewriteRule "\.wasm\.br$" "-" [T=application/wasm,E=no-brotli,E=no-gzip]

<FilesMatch ".+\.br$">
        Header set Content-Encoding br
        Header append Vary Accept-Encoding
</FilesMatch>
