Azion.networkList.contains() interface can be used by edge functions on Edge Firewall to match an IP address against a specific network list. If the IP address informed is within the network list, it returns
true and the desired implementation logic can go on based on that information.
SyntaxSection titled Syntax
ParametersSection titled Parameters
|string||The ID of the network list to be used for matching.|
|string||The IP address to be matched against the network list.|
Note: if the network list ID informed is incorrect, an error is thrown.
Find out more about Network Lists on the Azion Platform.
Return valueSection titled Return value
true if the IP address is in the network list and
false if it’s not.
UsageSection titled Usage
Basic usage of
Azion.networkList.contains() with a specific IP address and network list ID:
Error handlingSection titled Error handling
If an error occurs during the execution of
Azion.networkList.contains(), an exception may be thrown. Make sure to handle potential errors and provide appropriate error messages or fallback actions in your code.
Best practicesSection titled Best practices
- Regularly update and maintain the network lists to ensure accurate matching and minimize false positives or false negatives.
- Combine network list matching with other security measures for comprehensive protection.
- Ensure the integrity and security of the network lists to prevent unauthorized modifications or access.
- Regularly review and update the network list configurations to address changing security threats and requirements.