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

implemented #3445 - Add support for additional user defined headers to be added to webhook requests

This commit is contained in:
John Anderson
2019-10-13 03:09:58 -04:00
parent 8480c0da53
commit c7d9bf839e
4 changed files with 35 additions and 2 deletions

View File

@ -25,6 +25,9 @@ def process_webhook(webhook, data, model_name, event, timestamp, username, reque
headers = {
'Content-Type': webhook.get_http_content_type_display(),
}
if webhook.additional_headers:
headers.update(webhook.additional_headers)
params = {
'method': 'POST',
'url': webhook.payload_url,