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
Click to show internal directories.
Click to hide internal directories.