Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCindy Pallares <cindy@gitlab.com>2018-11-28 21:38:00 +0300
committerCindy Pallares <cindy@gitlab.com>2018-11-29 03:08:32 +0300
commit94ab2d5fc80d71df5637e6bbe1f5272daf6aa38c (patch)
treee044ce2a16e90cc64373601be7345b259aa19815 /spec/support/helpers
parent4bc6f2e3ac8e6997ebc3b06867049dc38aa6d6e6 (diff)
Merge branch 'security-2736-prometheus-ssrf' into 'master'
[master] Do not follow redirects in prometheus service See merge request gitlab/gitlabhq!2617
Diffstat (limited to 'spec/support/helpers')
-rw-r--r--spec/support/helpers/prometheus_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/prometheus_helpers.rb b/spec/support/helpers/prometheus_helpers.rb
index 4212be2cc88..ce1f9fce10d 100644
--- a/spec/support/helpers/prometheus_helpers.rb
+++ b/spec/support/helpers/prometheus_helpers.rb
@@ -49,11 +49,11 @@ module PrometheusHelpers
"https://prometheus.example.com/api/v1/series?#{query}"
end
- def stub_prometheus_request(url, body: {}, status: 200)
+ def stub_prometheus_request(url, body: {}, status: 200, headers: {})
WebMock.stub_request(:get, url)
.to_return({
status: status,
- headers: { 'Content-Type' => 'application/json' },
+ headers: { 'Content-Type' => 'application/json' }.merge(headers),
body: body.to_json
})
end