diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 01:05:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 01:05:44 +0300 |
commit | f5897da89ca63facbef54c23cff894f2bbe8e644 (patch) | |
tree | 9671f60e71b3cb78705a211977870fb1c5a4b354 /app/models/integrations/datadog.rb | |
parent | 10d9a3bf50cca85dd857c5306a34d7a6032580e6 (diff) |
Add latest changes from gitlab-org/security/gitlab@15-4-stable-ee
Diffstat (limited to 'app/models/integrations/datadog.rb')
-rw-r--r-- | app/models/integrations/datadog.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/integrations/datadog.rb b/app/models/integrations/datadog.rb index 4479725a33b..c9407aa738e 100644 --- a/app/models/integrations/datadog.rb +++ b/app/models/integrations/datadog.rb @@ -154,13 +154,17 @@ module Integrations url = api_url.presence || sprintf(URL_TEMPLATE, datadog_domain: datadog_domain) url = URI.parse(url) query = { - "dd-api-key" => api_key, + "dd-api-key" => 'THIS_VALUE_WILL_BE_REPLACED', service: datadog_service.presence, env: datadog_env.presence, tags: datadog_tags_query_param.presence }.compact url.query = query.to_query - url.to_s + url.to_s.gsub('THIS_VALUE_WILL_BE_REPLACED', '{api_key}') + end + + def url_variables + { 'api_key' => api_key } end def execute(data) |