echo

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractClientIP

func ExtractClientIP(c echo.Context, trustedProxies []string) string

ExtractClientIP mengekstrak IP client secara aman dari Echo Context.

func New

func New(limiter *distlimit.Limiter, opts ...Option) echo.MiddlewareFunc

New mengembalikan Echo v4 Middleware Handler.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*Config)

func WithKeyFunc

func WithKeyFunc(fn func(c echo.Context) string) Option

WithKeyFunc kustomisasi fungsi penentuan key rate limit berdasarkan Echo Context.

func WithTrustedProxies

func WithTrustedProxies(proxies []string) Option

WithTrustedProxies menentukan daftar IP/CIDR proxy yang dipercayai untuk membaca X-Forwarded-For.

Jump to

Keyboard shortcuts

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