Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProviderProductionSet provides CORSMiddleware for use in production. ProviderProductionSet = wire.NewSet(Provide, Cfg) )
Functions ¶
Types ¶
type CORSMiddleware ¶
CORSMiddleware serves as middleware to specify CORS settings.
func Provide ¶
func Provide(cfg *cors.Config) *CORSMiddleware
Provide returns the CORSMiddleware configured with the provided Config.
func (*CORSMiddleware) HandleCORS ¶
func (c *CORSMiddleware) HandleCORS() gin.HandlerFunc
HandleCORS provides the HandlerFunc to apply CORS settings to requests.
Click to show internal directories.
Click to hide internal directories.