Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAllowed = errors.New("not allowed")
Functions ¶
Types ¶
type Config ¶
type Config struct {
Enabled bool
DatabaseFilePath string
AllowedCountries []string
AllowPrivate bool
}
func CreateConfig ¶
func CreateConfig() *Config
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) CheckAllowed ¶
CheckAllowed checks whether a given IP address is allowed according to the configured allowed countries.
func (*Plugin) GetRemoteIPs ¶
GetRemoteIPs collects the remote IPs from the X-Forwarded-For and X-Real-IP headers.
Click to show internal directories.
Click to hide internal directories.