diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-03-24 17:59:09 +0400 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-03-24 17:59:09 +0400 |
commit | 8af94ed75505f0253823b9b2d44320fecea5b5fb (patch) | |
tree | 57d8c34ff2950ad154e6bbb83916c9fdaf9c0e4c /lib | |
parent | e0bddb64da0d0c2b68cae779dbc4a4bbd49565e6 (diff) |
Add gzip compression for assets to nginx example.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/support/nginx/gitlab | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab index 7a0f3efbb53..5bff362da0e 100644 --- a/lib/support/nginx/gitlab +++ b/lib/support/nginx/gitlab @@ -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; } |