Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker allows to check that addresses are in a trusted IPs
func NewChecker ¶
NewChecker builds a new Checker given a list of CIDR-Strings to trusted IPs
func (*Checker) ContainsIP ¶
ContainsIP checks if provided address is in the trusted IPs
func (*Checker) IsAuthorized ¶
IsAuthorized checks if provided request is authorized by the trusted IPs
type CheckerStrategy ¶
type CheckerStrategy struct {
Checker *Checker
}
CheckerStrategy a strategy based on an IP Checker allows to check that addresses are in a trusted IPs
type DepthStrategy ¶
type DepthStrategy struct {
Depth int
}
DepthStrategy a strategy based on the depth inside the X-Forwarded-For from right to left
type RemoteAddrStrategy ¶
type RemoteAddrStrategy struct{}
RemoteAddrStrategy a strategy that always return the remote address
Click to show internal directories.
Click to hide internal directories.