cors

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) gin.HandlerFunc

Types

type Option

type Option func(*handler)

func WithAllowHeaders

func WithAllowHeaders(keys ...string) Option

func WithAllowMethods

func WithAllowMethods(methods ...string) Option

func WithAllowOriginFunc

func WithAllowOriginFunc(fun func(origin string) bool) Option

func WithExposeHeaders

func WithExposeHeaders(keys ...string) Option

func WithMaxAge

func WithMaxAge(d time.Duration) Option

Jump to

Keyboard shortcuts

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