Commit 36ea8645 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'enable_assets_compression' into 'master'

Add gzip compression for assets to nginx example
parents ad7277df 8af94ed7
...@@ -54,6 +54,14 @@ server { ...@@ -54,6 +54,14 @@ server {
proxy_pass http://gitlab; 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; error_page 502 /502.html;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment