Merge branch 'enable_assets_compression' into 'master'
Add gzip compression for assets to nginx example
This commit is contained in:
commit
36ea864504
1 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,14 @@ server {
|
|||
proxy_pass http://gitlab;
|
||||
}
|
||||
|
||||
# Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression
|
||||
location ~ ^/(assets)/ {
|
||||
root /home/git/gitlab/public;
|
||||
gzip_static on; # to serve pre-gzipped version
|
||||
expires max;
|
||||
add_header Cache-Control public;
|
||||
}
|
||||
|
||||
error_page 502 /502.html;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue