From 6818ddcbc687462ef014e7e75db0e3a19f7fe9bf Mon Sep 17 00:00:00 2001 From: ray-1337 <33544674+ray-1337@users.noreply.github.com> Date: Sun, 4 Jun 2023 18:55:16 +0200 Subject: [PATCH] allow port param to be undefined --- src/methods/Allow.ts | 2 +- src/methods/Deny.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/methods/Allow.ts b/src/methods/Allow.ts index 3903f2d..380d474 100644 --- a/src/methods/Allow.ts +++ b/src/methods/Allow.ts @@ -20,7 +20,7 @@ async function port(port: number, protocol?: PortProtocol) { /** * Allow incoming requests through specific (IP) address. (root/sudo access is mandatory) */ -async function address(address: string, port: number, protocol?: PortProtocol) { +async function address(address: string, port?: number, protocol?: PortProtocol) { try { // address validation let checkAddress = checkAppropriateIP(address); diff --git a/src/methods/Deny.ts b/src/methods/Deny.ts index 04de425..ea9ebb1 100644 --- a/src/methods/Deny.ts +++ b/src/methods/Deny.ts @@ -20,7 +20,7 @@ async function port(port: number, protocol?: PortProtocol) { /** * Deny incoming requests through specific (IP) address. (root/sudo access is mandatory) */ -async function address(address: string, port: number, protocol?: PortProtocol) { +async function address(address: string, port?: number, protocol?: PortProtocol) { try { // address validation let checkAddress = checkAppropriateIP(address);