feature

package
v0.0.0-...-b15094b Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CROSConfig

type CROSConfig struct {
	EnabledCROS      bool
	AllowedOrigins   string
	AllowedMethods   string
	AllowedHeaders   string
	AllowCredentials bool
	AllowedP3P       string
}

CROS配置

func NewCORSConfig

func NewCORSConfig() *CROSConfig

func (*CROSConfig) SetAllowCredentials

func (c *CROSConfig) SetAllowCredentials(flag bool) *CROSConfig

func (*CROSConfig) SetHeader

func (c *CROSConfig) SetHeader(headers string) *CROSConfig

func (*CROSConfig) SetMethod

func (c *CROSConfig) SetMethod(methods string) *CROSConfig

func (*CROSConfig) SetOrigin

func (c *CROSConfig) SetOrigin(origins string) *CROSConfig

func (*CROSConfig) UseDefault

func (c *CROSConfig) UseDefault() *CROSConfig

type Feature

type Feature struct {
	CROSConfig *CROSConfig
}

func NewFeature

func NewFeature() *Feature

func (*Feature) SetDisabledCROS

func (f *Feature) SetDisabledCROS()

set Disabled CROS false

func (*Feature) SetEnabledCROS

func (f *Feature) SetEnabledCROS() *CROSConfig

set Enabled CROS true, with default config

Jump to

Keyboard shortcuts

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