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) SetEnabledCROS ¶
func (f *Feature) SetEnabledCROS() *CROSConfig
set Enabled CROS true, with default config
Click to show internal directories.
Click to hide internal directories.