UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks

14 lines (13 loc) 442 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMaxBodySize = getMaxBodySize; const MAX_BODY_SIZE_MB = 20; function getMaxBodySize() { if (process.env.AIKIDO_MAX_BODY_SIZE_MB) { const parsed = parseInt(process.env.AIKIDO_MAX_BODY_SIZE_MB, 10); if (!isNaN(parsed) && parsed > 0) { return parsed * 1024 * 1024; } } return MAX_BODY_SIZE_MB * 1024 * 1024; }