Commit 8af94ed75505f0253823b9b2d44320fecea5b5fb
1 parent
e0bddb64
Exists in
spb-stable
and in
3 other branches
Add gzip compression for assets to nginx example.
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
lib/support/nginx/gitlab
... | ... | @@ -54,6 +54,14 @@ server { |
54 | 54 | proxy_pass http://gitlab; |
55 | 55 | } |
56 | 56 | |
57 | + # Enable gzip compression as per rails guide: http://guides.rubyonrails.org/asset_pipeline.html#gzip-compression | |
58 | + location ~ ^/(assets)/ { | |
59 | + root /home/git/gitlab/public; | |
60 | + gzip_static on; # to serve pre-gzipped version | |
61 | + expires max; | |
62 | + add_header Cache-Control public; | |
63 | + } | |
64 | + | |
57 | 65 | error_page 502 /502.html; |
58 | 66 | } |
59 | 67 | ... | ... |