Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // AllowedIPs list of IPs and/or CIDRs. AllowedIPs []string // ForbiddenHandler will be invoked when client is blocked. // If nil then http.Error will be used. ForbiddenHandler http.Handler }
Config for the handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler to filter client by IP.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler interface.
Click to show internal directories.
Click to hide internal directories.