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);