ip

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Trusted IPs module.

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 trusted_ips 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-*).

See https://docs.konghq.com/latest/configuration/#trusted_ips

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ip

type Ip struct {
	bridge.PdkBridge
}

Holds this module's functions. Accessible as `kong.Ip`

func (Ip) IsTrusted

func (ip Ip) IsTrusted(address string) (bool, error)

Depending on the trusted_ips configuration property, this function will return whether a given ip is trusted or not. Both ipv4 and ipv6 are supported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL