middleware

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLog

func AccessLog() gin.HandlerFunc

func CORS

func CORS(cfg CORSConfig) gin.HandlerFunc

func Recovery

func Recovery() gin.HandlerFunc

func RequestID

func RequestID() gin.HandlerFunc

func SecurityHeaders

func SecurityHeaders() gin.HandlerFunc

Types

type CORSConfig

type CORSConfig struct {
	AllowOrigins []string `yaml:"allowed-origins"`
	AllowMethods []string `yaml:"allowed-methods"`
	AllowHeaders []string `yaml:"allowed-headers"`
}

func DefaultCORSConfig

func DefaultCORSConfig() CORSConfig

Jump to

Keyboard shortcuts

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