cors

package
v0.0.0-...-45f08d6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(options *Options) core.Middleware

Middleware new create a CORS Middleware

Types

type Options

type Options struct {
	Enabled          bool
	AllowOrigin      string
	AllowMethods     string
	AllowHeaders     string
	AllowCredentials bool
	ExposeHeaders    string
	AllowP3P         string
	MaxAge           int
}

Options CROS配置

func NewDefault

func NewDefault() *Options

NewDefault NewDefault

func NewOptions

func NewOptions() *Options

NewOptions NewOptions

Jump to

Keyboard shortcuts

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