Use NGINX proxy caching
This commit is contained in:
parent
8f6f66a73c
commit
8b91c071e8
|
@ -456,6 +456,11 @@ default['gitlab']['nginx']['proxy_set_headers'] = {
|
|||
"X-Forwarded-For" => "$proxy_add_x_forwarded_for"
|
||||
}
|
||||
|
||||
# Cache up to 1GB of HTTP responses from GitLab on disk
|
||||
default['gitlab']['nginx']['proxy_cache_path'] = 'proxy_cache keys_zone=gitlab:10m max_size=1g levels=1:2'
|
||||
# Set to 'off' to disable proxy caching.
|
||||
default['gitlab']['nginx']['proxy_cache'] = 'gitlab'
|
||||
|
||||
|
||||
###
|
||||
# Logging
|
||||
|
|
|
@ -32,6 +32,9 @@ http {
|
|||
|
||||
include /opt/gitlab/embedded/conf/mime.types;
|
||||
|
||||
proxy_cache_path <%= @proxy_cache_path %>;
|
||||
proxy_cache <%= @proxy_cache %>;
|
||||
|
||||
<% if @gitlab_http_config %>
|
||||
include <%= @gitlab_http_config %>;
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue