Skip to content

Commit

Permalink
support multi private cidrs
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Nov 13, 2023
1 parent 2a8e977 commit 4fec150
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const isPrivateVoipNetwork = async(uri) => {
} else {
addresses = await dns.resolve4(input);
}
const matcher = new CIDRMatcher([process.env.PRIVATE_VOIP_NETWORK_CIDR]);
const matcher = new CIDRMatcher(process.env.PRIVATE_VOIP_NETWORK_CIDR.split(','));
for (const ip of addresses) {
if (matcher.contains(ip)) {
return true;
Expand Down

0 comments on commit 4fec150

Please sign in to comment.