httpguard

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalBodyLimit = 1 << 20
	SmallJSONLimit  = 4 << 10
	WebAuthnLimit   = 128 << 10
	PairingLimit    = 16 << 10
)

Variables

This section is empty.

Functions

func BodyReadDeadline

func BodyReadDeadline(timeout time.Duration) func(http.Handler) http.Handler

func GlobalBodyLimitMiddleware

func GlobalBodyLimitMiddleware(limit int64) func(http.Handler) http.Handler

func JSONBody

func JSONBody(limit int64) func(http.Handler) http.Handler

JSONBody validates the media type, reads a bounded body, and accepts exactly one JSON value before restoring the body for the route's decoder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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