cors

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 3 Imported by: 1

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(*cors.Config)

func WithAllowCredentials

func WithAllowCredentials(ac bool) Option

func WithAllowHeaders

func WithAllowHeaders(hs []string) Option

func WithAllowMethods

func WithAllowMethods(ms []string) Option

func WithAllowOrigin

func WithAllowOrigin(os []string) Option

func WithAllowWildcard

func WithAllowWildcard(aw bool) Option

func WithMaxAge

func WithMaxAge(ma time.Duration) Option

Jump to

Keyboard shortcuts

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