cors

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderVary   = "Vary"
	HeaderOrigin = "Origin"

	// Access control
	HeaderAccessControlRequestMethod    = "Access-Control-Request-Method"
	HeaderAccessControlRequestHeaders   = "Access-Control-Request-Headers"
	HeaderAccessControlAllowOrigin      = "Access-Control-Allow-Origin"
	HeaderAccessControlAllowMethods     = "Access-Control-Allow-Methods"
	HeaderAccessControlAllowHeaders     = "Access-Control-Allow-Headers"
	HeaderAccessControlAllowCredentials = "Access-Control-Allow-Credentials"
	HeaderAccessControlExposeHeaders    = "Access-Control-Expose-Headers"
	HeaderAccessControlMaxAge           = "Access-Control-Max-Age"
)

Headers

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(opts ...Option) plugin.Plugin

Types

type Option

type Option func(*Options)

func WithAllowCredentials

func WithAllowCredentials(allow bool) Option

func WithAllowMethods

func WithAllowMethods(methods ...string) Option

func WithExposeHeaders

func WithExposeHeaders(headers ...string) Option

func WithMaxAge

func WithMaxAge(maxAge int) Option

func WithUseRsPkg

func WithUseRsPkg(useRs bool) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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