middleware

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORSMiddleware added in v0.3.13

func CORSMiddleware(allowedOrigins []string) func(http.Handler) http.Handler

CORSMiddleware returns a CORS middleware handler. If allowedOrigins is empty, the returned middleware is a no-op, making CORS effectively disabled. This is the secure default: deployments that do not explicitly configure allowed origins will not accept cross-origin requests.

func ValidationMiddleware

func ValidationMiddleware(next http.Handler) http.Handler

ValidationMiddleware validates all query parameters and request body for unsafe characters

func WrapWithValidation

func WrapWithValidation(handler http.Handler) http.Handler

WrapWithValidation wraps an http.Handler with custom validation middleware

Types

This section is empty.

Jump to

Keyboard shortcuts

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