open-next-cdk
Version:
Deploy a NextJS app using OpenNext packaging to serverless AWS using CDK
7 lines (6 loc) • 380 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isIpAddress = void 0;
const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]"));
exports.isIpAddress = isIpAddress;