2021-08-19 02:29:51 +08:00
|
|
|
<IfModule mod_headers.c>
|
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine On
|
2021-08-18 22:24:05 +08:00
|
|
|
|
2021-08-19 02:29:51 +08:00
|
|
|
RewriteCond %{HTTP:Accept-encoding} br
|
|
|
|
RewriteCond "%{REQUEST_FILENAME}\.br" -s
|
|
|
|
RewriteRule "^(.+\.js)$" "$1\.br" [L,T=application/javascript,QSA]
|
2021-08-18 22:24:05 +08:00
|
|
|
|
2021-08-19 02:29:51 +08:00
|
|
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
|
|
|
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
|
|
|
RewriteRule "^(.+\.js)$" "$1\.gz" [L,T=application/javascript,QSA]
|
2021-08-18 22:24:05 +08:00
|
|
|
|
2021-08-19 02:29:51 +08:00
|
|
|
RewriteCond %{HTTP:Accept-encoding} br
|
|
|
|
RewriteCond "%{REQUEST_FILENAME}\.br" -s
|
|
|
|
RewriteRule "^(.+\.css)$" "$1\.br" [L,T=text/css,QSA]
|
|
|
|
|
|
|
|
RewriteCond %{HTTP:Accept-encoding} gzip
|
|
|
|
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
|
|
|
|
RewriteRule "^(.+\.css)$" "$1\.gz" [L,T=text/css,QSA]
|
|
|
|
|
2022-09-24 17:00:50 +08:00
|
|
|
<FilesMatch "\.(js|css)\.br$">
|
2021-08-19 02:29:51 +08:00
|
|
|
SetEnv no-gzip 1
|
|
|
|
SetEnv no-brotli 1
|
|
|
|
# Serve correct encoding type.
|
|
|
|
Header append Content-Encoding br
|
|
|
|
# Force proxies to cache brotli &
|
|
|
|
# non-brotli css/js files separately.
|
|
|
|
Header append Vary Accept-Encoding
|
|
|
|
</FilesMatch>
|
|
|
|
|
2022-09-24 17:00:50 +08:00
|
|
|
<FilesMatch "\.(js|css)\.gz$">
|
2021-08-19 02:29:51 +08:00
|
|
|
SetEnv no-gzip 1
|
|
|
|
SetEnv no-brotli 1
|
|
|
|
# Serve correct encoding type.
|
|
|
|
Header append Content-Encoding gzip
|
|
|
|
# Force proxies to cache gzipped &
|
|
|
|
# non-gzipped css/js files separately.
|
|
|
|
Header append Vary Accept-Encoding
|
|
|
|
</FilesMatch>
|
|
|
|
|
2022-09-24 17:00:50 +08:00
|
|
|
<FilesMatch "\.js\.(br|gz)$">
|
2021-08-19 02:29:51 +08:00
|
|
|
Header set Content-Type "application/javascript; charset=utf-8"
|
|
|
|
ForceType application/javascript
|
|
|
|
</FilesMatch>
|
2022-09-24 17:00:50 +08:00
|
|
|
<FilesMatch "\.css\.(br|gz)$">
|
2021-08-19 02:29:51 +08:00
|
|
|
Header set Content-Type "text/css; charset=utf-8"
|
|
|
|
ForceType text/css
|
|
|
|
</FilesMatch>
|
|
|
|
</IfModule>
|
2021-08-18 22:24:05 +08:00
|
|
|
</IfModule>
|