@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) • 519 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldBlock = shouldBlock;
const envToBool_1 = require("./envToBool");
/**
* Check the environment variables to see if the firewall should block requests if an attack is detected.
* - AIKIDO_BLOCKING=true or AIKIDO_BLOCKING=1
* - AIKIDO_BLOCK=true or AIKIDO_BLOCK=1
*/
function shouldBlock() {
return ((0, envToBool_1.envToBool)(process.env.AIKIDO_BLOCKING) ||
(0, envToBool_1.envToBool)(process.env.AIKIDO_BLOCK));
}