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

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

type Options = cors.Options

Options is a configuration container to setup the CORS middleware.

Source Files

gin.go

Version
v1.5.0
Published
Jul 26, 2018
Platform
js/wasm
Imports
3 packages
Last checked
13 hours ago

Tools for package owners.