feat: Add configurable proxy for outgoing traffic to prevent SSRF

This commit is contained in:
Maksim Eltyshev
2026-02-09 13:33:27 +01:00
parent aa3ebd5add
commit 538280d197
12 changed files with 174 additions and 8 deletions
@@ -3,6 +3,8 @@
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
const { ProxyAgent } = require('undici');
const Webhook = require('../../models/Webhook');
/**
@@ -61,6 +63,9 @@ async function sendWebhook(webhook, event, data, prevData, user) {
headers,
body,
method: 'POST',
dispatcher: sails.config.custom.outgoingProxy
? new ProxyAgent(sails.config.custom.outgoingProxy)
: undefined,
});
if (!response.ok) {