package gin
import "github.com/rs/cors/wrapper/gin"
Package cors/wrapper/gin provides gin.HandlerFunc to handle CORS related requests as a wrapper of github.com/rs/cors handler.
Index ¶
- func AllowAll() gin.HandlerFunc
- func Default() gin.HandlerFunc
- func New(options Options) gin.HandlerFunc
- type Options
Functions ¶
func AllowAll ¶
func AllowAll() gin.HandlerFunc
AllowAll creates a new CORS Gin middleware with permissive configuration allowing all origins with all standard methods with any header and credentials.
func Default ¶
func Default() gin.HandlerFunc
Default creates a new CORS Gin middleware with default options.
func New ¶
func New(options Options) gin.HandlerFunc
New creates a new CORS Gin middleware with the provided options.
Types ¶
type Options ¶
Options is a configuration container to setup the CORS middleware.
Source Files ¶
- Version
- v1.7.0
- Published
- Jul 9, 2019
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 13 hours ago –
Tools for package owners.