mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed Apache configuration for gzipped assets: FilesMatch and LocationMatch cannot be nested.
This commit is contained in:
parent
9584e15d39
commit
5e2bf4de62
1 changed files with 9 additions and 9 deletions
|
@ -414,16 +414,16 @@ For Apache:
|
|||
# 2 lines to serve pre-gzipped version
|
||||
RewriteCond %{REQUEST_FILENAME}.gz -s
|
||||
RewriteRule ^(.+) $1.gz [L]
|
||||
|
||||
# without it, Content-Type will be "application/x-gzip"
|
||||
<FilesMatch .*\.css.gz>
|
||||
ForceType text/css
|
||||
</FilesMatch>
|
||||
|
||||
<FilesMatch .*\.js.gz>
|
||||
ForceType text/javascript
|
||||
</FilesMatch>
|
||||
</LocationMatch>
|
||||
|
||||
# without these, Content-Type will be "application/x-gzip"
|
||||
<FilesMatch "^/assets/.*\.css.gz$">
|
||||
ForceType text/css
|
||||
</FilesMatch>
|
||||
|
||||
<FilesMatch "^/assets/.*\.js.gz$">
|
||||
ForceType text/javascript
|
||||
</FilesMatch>
|
||||
</plain>
|
||||
|
||||
For nginx:
|
||||
|
|
Loading…
Reference in a new issue