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