middleware

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// HeaderRateLimitLimit, HeaderRateLimitRemaining, and HeaderRateLimitReset
	// are the recommended return header values from IETF on rate limiting. Reset
	// is in UTC time.
	HeaderRateLimitLimit     = "X-RateLimit-Limit"
	HeaderRateLimitRemaining = "X-RateLimit-Remaining"
	HeaderRateLimitReset     = "X-RateLimit-Reset"

	// HeaderRetryAfter is the header used to indicate when a client should retry
	// requests (when the rate limit expires), in UTC time.
	HeaderRetryAfter = "Retry-After"
)
View Source
const HeaderCsrfKey = "X-CSRF-TOKEN"

Variables

This section is empty.

Functions

func CheckForMaintenanceMode added in v1.18.0

func CheckForMaintenanceMode() contractshttp.Middleware

func Throttle added in v1.10.0

func Throttle(name string) httpcontract.Middleware

func VerifyCsrfToken added in v1.17.0

func VerifyCsrfToken(excepts ...[]string) contractshttp.Middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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