File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
files/gitlab-cookbooks/gitlab/templates/default
spec/chef/cookbooks/gitlab/recipes Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ location /error.json {
15
15
<% @monitoring_addresses.each do |address| %>
16
16
location = <%= File.join(@path, address[:url]) %> {
17
17
proxy_cache off;
18
- proxy_http_version 1.1 ;
18
+ proxy_http_version 1.0 ;
19
19
proxy_pass http://gitlab-workhorse;
20
20
error_page 404 500 502 /error.<%= address[:format] %> ;
21
21
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ server {
37
37
38
38
location /rails-metrics {
39
39
proxy_cache off;
40
- proxy_http_version 1.1 ;
40
+ proxy_http_version 1.0 ;
41
41
proxy_pass http://gitlab-workhorse/-/metrics;
42
42
<% @options.each do |key, value|
43
43
if value.is_a?(String) -%>
Original file line number Diff line number Diff line change 94
94
}
95
95
end
96
96
97
+ let ( :metrics_http_conf ) do
98
+ {
99
+ "gitlab-health" => "/var/opt/gitlab/nginx/conf/gitlab-health.conf" ,
100
+ "nginx-status" => "/var/opt/gitlab/nginx/conf/nginx-status.conf"
101
+ }
102
+ end
103
+
97
104
before do
98
105
allow ( Gitlab ) . to receive ( :[] ) . and_call_original
99
106
end
428
435
}
429
436
end
430
437
end
438
+
439
+ it 'sets proxy_http_version 1.0 when proxy_pass is used' do
440
+ metrics_http_conf . each_value do |conf |
441
+ expect ( chef_run ) . to render_file ( conf ) . with_content { |content |
442
+ expect ( content ) . to include ( 'proxy_http_version 1.0;' ) if content . include? ( 'proxy_pass' )
443
+ }
444
+ end
445
+ end
431
446
end
432
447
433
448
context 'when is enabled' do
You can’t perform that action at this time.
0 commit comments