diff --git a/server/notification-providers/webhook.js b/server/notification-providers/webhook.js index ca1c106a1..347b6ec9b 100644 --- a/server/notification-providers/webhook.js +++ b/server/notification-providers/webhook.js @@ -28,8 +28,15 @@ class Webhook extends NotificationProvider { finalData = data; } - if (notification.webhookAuthorizationHeader) { - config.headers["Authorization"] = notification.webhookAuthorizationHeader; + if (notification.webhookAdditionalHeaders) { + try { + config.headers = { + ...config.headers, + ...JSON.parse(notification.webhookAdditionalHeaders) + }; + } catch (err) { + throw "Addional Headers is not a valid JSON"; + } } await axios.post(notification.webhookURL, finalData, config); diff --git a/src/components/notifications/Webhook.vue b/src/components/notifications/Webhook.vue index 241ecd9a5..1b85a5409 100644 --- a/src/components/notifications/Webhook.vue +++ b/src/components/notifications/Webhook.vue @@ -12,7 +12,9 @@