From 5ae0d61d0a457ebaeed78f6acd01447b5760e75a Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 15 Jan 2014 15:16:19 +0100 Subject: [PATCH] Disable SSL peer verification for all webhooks --- app/models/web_hook.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb index c0aa373..8a5c4b6 100644 --- a/app/models/web_hook.rb +++ b/app/models/web_hook.rb @@ -28,7 +28,7 @@ class WebHook < ActiveRecord::Base def execute(data) parsed_url = URI.parse(url) if parsed_url.userinfo.blank? - WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" }) + WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" }, verify: false) else post_url = url.gsub("#{parsed_url.userinfo}@", "") auth = { @@ -38,6 +38,7 @@ class WebHook < ActiveRecord::Base WebHook.post(post_url, body: data.to_json, headers: {"Content-Type" => "application/json"}, + verify: false, basic_auth: auth) end end -- libgit2 0.21.2