From 7a72e2cbb773f0985f404002050d06078fa6a522 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 27 Feb 2025 10:59:32 +0200 Subject: [PATCH] allow http --- lib/send_webhook_request.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/send_webhook_request.rb b/lib/send_webhook_request.rb index c4632c0a..96442441 100644 --- a/lib/send_webhook_request.rb +++ b/lib/send_webhook_request.rb @@ -18,7 +18,9 @@ module SendWebhookRequest end if Docuseal.multitenant? - raise HttpsError, 'Only HTTPS is allowed.' if uri.scheme != 'https' + raise HttpsError, 'Only HTTPS is allowed.' if uri.scheme != 'https' && + !AccountConfig.exists?(key: :allow_http, + account_id: webhook_url.account_id) raise LocalhostError, "Can't send to localhost." if uri.host.in?(LOCALHOSTS) end