UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Application Firewall that autonomously protects Node.js apps against common and critical attacks, provides rate limiting, detects malicious traffic (including bots), and more.

21 lines (20 loc) 874 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isFirewallSupported; /* eslint-disable no-console */ const getNodeVersion_1 = require("./getNodeVersion"); function isFirewallSupported() { // @ts-expect-error Unknown type of globalThis if (globalThis.Deno || globalThis.Bun) { // @ts-expect-error Unknown type of globalThis const runtimeName = globalThis.Deno ? "Deno" : "Bun"; console.error(`Error: Aikido Firewall does not support ${runtimeName}. If you want support for ${runtimeName}, please contact us: hello@aikido.dev`); return false; } // Check for unsupported Node.js versions if ((0, getNodeVersion_1.getMajorNodeVersion)() < 16) { console.error("Error: Aikido Firewall requires Node.js 16 or higher to run."); return false; } return true; }