n8n
Version:
n8n Workflow Automation Tool
21 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SsrfBlockedIpError = void 0;
const n8n_workflow_1 = require("n8n-workflow");
class SsrfBlockedIpError extends n8n_workflow_1.UserError {
constructor(ip, hostname) {
const target = hostname ? `'${hostname}' (${ip})` : ip;
super('The request was blocked because it resolves to a restricted IP address', {
description: `The target ${target} is not allowed. ` +
'This is a security measure to prevent Server-Side Request Forgery (SSRF). ' +
'If you need to access internal resources, ask your n8n administrator to allowlist ' +
'the hostname or IP range in the environment configuration.',
extra: { ip, hostname },
});
this.name = 'SsrfBlockedIpError';
this.ip = ip;
this.hostname = hostname;
}
}
exports.SsrfBlockedIpError = SsrfBlockedIpError;
//# sourceMappingURL=ssrf-blocked-ip.error.js.map