cors

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 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

NewPlugin for cors

Types

type Option

type Option func(*Options)

Option of cors

func WithAllowCredentials

func WithAllowCredentials(allow bool) Option

WithAllowCredentials of cors

func WithAllowMethods

func WithAllowMethods(methods ...string) Option

WithAllowMethods of cors

func WithExposeHeaders

func WithExposeHeaders(headers ...string) Option

WithExposeHeaders of cors

func WithMaxAge

func WithMaxAge(maxAge int) Option

WithMaxAge of cors

func WithUseRsPkg

func WithUseRsPkg(useRs bool) Option

WithUseRsPkg of cors

type Options

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

Options of cors

Jump to

Keyboard shortcuts

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