middleware

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

View Source
const (
	AccessControlAllowOrigin  = "Access-Control-Allow-Origin"
	AccessControlAllowMethods = "Access-Control-Allow-Methods"
	AccessControlAllowHeaders = "Access-Control-Allow-Headers"
)

Variables

This section is empty.

Functions

func CORS

func CORS(next gsk.HandlerFunc) gsk.HandlerFunc

func SecurityHeaders

func SecurityHeaders(next gsk.HandlerFunc) gsk.HandlerFunc

Types

type RateLimiter

type RateLimiter struct {
	Middleware gsk.Middleware
	// contains filtered or unexported fields
}

func NewRateLimiter

func NewRateLimiter(requestsPerInterval int, interval time.Duration) *RateLimiter

Jump to

Keyboard shortcuts

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