kong.ip

    This module can be used to determine whether or not a given IP address is in the range of trusted IP addresses defined by the configuration property.

    Trusted IP addresses are those that are known to send correct replacement addresses for clients (as per the chosen header field, e.g. X-Forwarded-*).

    Depending on the configuration property, this function will return 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

    Returns

    • if the IP is trusted, otherwise

    Usage