Source code for kong.ip

# AUTO GENERATED BASED ON Kong 3.8.x, DO NOT EDIT
# Original source path: kong/pdk/ip.lua

from typing import TypeVar, Any, Union, List, Mapping, Tuple, Optional

number = TypeVar('number', int, float)
table = TypeVar('table', List[Any], Mapping[str, Any])
array = table
# XXX
cdata = Any
err = str


[docs] class ip():
[docs] @staticmethod def is_trusted(address: str) -> bool: """ Depending on the `trusted_ips` configuration property, this function returns whether a given IP is trusted or not. Both ipv4 and ipv6 are supported. Phases: init_worker, certificate, rewrite, access, header_filter, response, body_filter, log Example: if kong.ip.is_trusted("1.1.1.1"): kong.log("The IP is trusted") :parameter address: A string representing an IP address. :type address: str :return: `true` if the IP is trusted, `false` otherwise. :rtype: bool """ pass
pass