Documentation
¶
Overview ¶
Package echov5 provides rate limiting middleware for the Echo v5 web framework. It features IP spoofing protection with trusted proxy CIDR filtering and custom key extraction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractClientIP ¶
ExtractClientIP securely extracts the client's real IP address from an Echo v5 *echo.Context. Header values (X-Forwarded-For, X-Real-IP) are parsed only if RemoteAddr originates from a trusted proxy.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds configuration parameters for the Echo v5 rate limit middleware.
type Option ¶
type Option func(*Config)
Option configures functional parameters for the Echo v5 rate limit middleware.
func WithKeyFunc ¶
WithKeyFunc configures a custom key extraction function based on the Echo v5 *echo.Context.
func WithRouteLabeling ¶ added in v1.2.0
WithRouteLabeling enables passing the Echo v5 route path pattern as the route label in telemetry events.
func WithTrustedProxies ¶
WithTrustedProxies configures a list of trusted proxy IPs or CIDR networks for safely parsing X-Forwarded-For headers.