Commit 8af94ed7 authored by Marin Jankovski's avatar Marin Jankovski

Add gzip compression for assets to nginx example.

parent e0bddb64
...@@ -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