1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

implemented #3499 - Add to Webhook model to support user supplied CA certificate verrification of webhook requests

This commit is contained in:
John Anderson
2019-10-13 01:43:08 -04:00
parent b25faec159
commit 09d7d38b04
4 changed files with 45 additions and 0 deletions

View File

@ -49,6 +49,8 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
with requests.Session() as session:
session.verify = webhook.ssl_verification
if webhook.ca_file_path:
session.verify = webhook.ca_file_path
response = session.send(prepared_request)
if response.status_code >= 200 and response.status_code <= 299: