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:
authorRémy Coutable <remy@rymai.me>2019-08-05 11:55:16 +0300
committerRémy Coutable <remy@rymai.me>2019-08-05 11:55:16 +0300
commitf74387d2982845b0fb5219ccf3fd128d75400472 (patch)
tree3cfbc60f1a62a1d308f1d1c98ad4a969721b873b /app/services
parente6a05e5a63b3b336179a4ed67df76ba7ad08fadb (diff)
parent260225eb5753a18e9e33ec2bb9c1bfc76d613448 (diff)
Merge branch 'georgekoltsov/55474-outbound-setting-system-hooks' into 'master'
Add outbound setting for system hooks See merge request gitlab-org/gitlab-ce!31177
Diffstat (limited to 'app/services')
-rw-r--r--app/services/web_hook_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb
index 6d675c026bb..8c294218708 100644
--- a/app/services/web_hook_service.rb
+++ b/app/services/web_hook_service.rb
@@ -17,8 +17,10 @@ class WebHookService
@hook = hook
@data = data
@hook_name = hook_name.to_s
- @request_options = { timeout: Gitlab.config.gitlab.webhook_timeout }
- @request_options.merge!(allow_local_requests: true) if @hook.is_a?(SystemHook)
+ @request_options = {
+ timeout: Gitlab.config.gitlab.webhook_timeout,
+ allow_local_requests: hook.allow_local_requests?
+ }
end
def execute